Tailwind CSS v1.0 is here! Learn more →

Pointer Events

Utilities for controlling whether an element responds to pointer events.

Work in progress!

More detailed documentation is coming soon, but in the meantime here's a quick class reference.

Class reference

Class Properties
.pointer-events-none pointer-events: none;
.pointer-events-auto pointer-events: auto;

Customizing

Responsive and State Variants

By default, only responsive variants are generated for pointer event utilities.

You can control which variants are generated for the pointer event utilities by modifying the pointerEvents property in the modules section of your Tailwind config file.

For example, this config will also generate hover and focus variants:

{
// ...
modules: {
    // ...
-   pointerEvents: ['responsive'],
+   pointerEvents: ['responsive', 'hover', 'focus', 'active', 'group-hover'],
}
}

Disabling

If you don't plan to use the pointer event utilities in your project, you can disable them entirely by setting the pointerEvents property to false in the modules section of your config file:

{
// ...
modules: {
    // ...
-   pointerEvents: ['responsive'],
+   pointerEvents: false,
}
}