Browse documentation

Reference / Interactivity

Pointer events

Allow pointer input to pass through an overlay or restore pointer targeting on a descendant.

Working example

The decorative frame covers the label yet clicks reach the checkbox and label beneath. Use the disabled attribute when a native control must be unavailable.

HTML
<label class="relative inline-flex items-center gap-2 border px-3 py-2">
  <input type="checkbox" class="accent-black"> Mark as proofed
  <span aria-hidden="true" class="pointer-events-none absolute inset-0 border border-dashed"></span>
</label>

Class reference

ClassCSS declarations
pointer-events-nonepointer-events: none;
pointer-events-autopointer-events: auto;
View full generated CSS
Compiled CSS
.pointer-events-auto {
  pointer-events: auto;
}
.pointer-events-none {
  pointer-events: none;
}