Interactivity
Utilities for controlling whether an element responds to pointer events.
Class | Styles |
---|---|
pointer-events-auto | pointer-events: auto; |
pointer-events-none | pointer-events: none; |
Use the pointer-events-none
utility to make an element ignore pointer events, like :hover
and click
events:
Click the search icons to see the expected behavior
The pointer events will still trigger on child elements and pass-through to elements that are "beneath" the target.
Use the pointer-events-auto
utility to revert to the default browser behavior for pointer events:
<div class="pointer-events-none md:pointer-events-auto ..."> <!-- ... --></div>