Interactivity

pointer-events

Setting whether an element reacts to pointer events.

Overview

ClassDeclarations
pointer-events:autopointer-events: auto;
pointer-events:visiblePaintedpointer-events: visiblePainted;
pointer-events:visibleFillpointer-events: visibleFill;
pointer-events:visibleStrokepointer-events: visibleStroke;
pointer-events:visiblepointer-events: visible;
pointer-events:paintedpointer-events: painted;
pointer-events:fillpointer-events: fill;
pointer-events:strokepointer-events: stroke;
pointer-events:allpointer-events: all;
pointer-events:<value>pointer-events: <value>;
pointer-events:nonepointer-events: none;

Examples

Let clicks pass through an overlay

Use pointer-events:none when an overlay is visual only and should not block the control beneath it.

<div class="rel">    <button>Open</button>    <span class="abs inset:0 pointer-events:none"></span></div>
Generated CSS
@layer utilities {    .pointer-events\:none {        pointer-events: none    }}

Use the untouchable alias

untouchable is an alias for pointer-events:none and is useful for decorative icons and images.

<svg class="untouchable" aria-hidden="true">...</svg>

Restore pointer events on a child

Combine a non-interactive parent with pointer-events:auto on a child that should still receive clicks.

<div class="pointer-events:none">    <button class="pointer-events:auto">Dismiss</button></div>

Apply conditionally

Apply styles based on different states using selectors and conditional queries.

<div class="pointer-events:none:hover pointer-events:auto@sm pointer-events:auto@print">...</div>

  • Master UI


© 2026 Aoyue Design LLC.MIT License
Trademark Policy