Cursor

    Utilities for controlling the cursor style when hovering over an element.

    Show all classes

    Use the to control which cursor is displayed when hovering over an element.

    Cursor - 图37


    Tailwind lets you conditionally apply utility classes in different states using variant modifiers. For example, use focus:cursor-auto to only apply the cursor-auto utility on focus.

    For a complete list of all available state modifiers, check out the documentation.

    You can also use variant modifiers to target media queries like responsive breakpoints, dark mode, prefers-reduced-motion, and more. For example, use to apply the cursor-auto utility at only medium screen sizes and above.


    By default, Tailwind includes cursor utilities for many built in options. You can customize these values by editing or theme.extend.cursor in your tailwind.config.js file.

    tailwind.config.js

    Learn more about customizing the default theme in the documentation.

    If you need to use a one-off value that doesn’t make sense to include in your theme, use square brackets to generate a property on the fly using any arbitrary value.