Tailwind CSS Cursor - GeeksforGeeks

Tailwind CSS Cursor

Last Updated : 4 Nov, 2026

Tailwind CSS provides utility classes to control the appearance of the mouse cursor when hovering over an element. These utilities correspond to the CSS cursor property and help indicate whether an element is clickable, draggable, selectable, or performing an operation.

The following table lists commonly used cursor utility classes in Tailwind CSS.

ClassDescription
cursor-autoAllows the browser to choose the appropriate cursor.
cursor-defaultDisplays the default cursor, usually an arrow.
cursor-pointerDisplays a pointer cursor, typically indicating an interactive element.
cursor-waitDisplays a cursor indicating that the user should wait.
cursor-textDisplays a text-selection cursor.
cursor-moveIndicates that an element can be moved.
cursor-helpIndicates that help is available.
cursor-not-allowedIndicates that an action is unavailable.
cursor-noneHides the cursor.
cursor-context-menuIndicates that a context menu is available.
cursor-progressIndicates that a process is running while interaction may still be possible.
cursor-cellDisplays a cell-selection cursor.
cursor-crosshairDisplays a crosshair cursor.
cursor-vertical-textDisplays a vertical text-selection cursor.
cursor-aliasIndicates that an alias or shortcut can be created.
cursor-copyIndicates that content can be copied.
cursor-no-dropIndicates that dropping an item is not allowed.
cursor-grabIndicates that an element can be grabbed.
cursor-grabbingIndicates that an element is being grabbed.
cursor-all-scrollIndicates that an element can be scrolled in any direction.
cursor-col-resizeIndicates that a column can be resized.
cursor-row-resizeIndicates that a row can be resized.
cursor-n-resizeIndicates that an element can be resized upward or downward from its north edge.
cursor-e-resizeIndicates that an element can be resized horizontally from its east edge.
cursor-s-resizeIndicates that an element can be resized downward or upward from its south edge.
cursor-w-resizeIndicates that an element can be resized horizontally from its west edge.
cursor-ne-resizeIndicates that an element can be resized diagonally toward the northeast.
cursor-nw-resizeIndicates that an element can be resized diagonally toward the northwest.
cursor-se-resizeIndicates that an element can be resized diagonally toward the southeast.
cursor-sw-resizeIndicates that an element can be resized diagonally toward the southwest.
cursor-ew-resizeIndicates horizontal resizing.
cursor-ns-resizeIndicates vertical resizing.
cursor-nesw-resizeIndicates diagonal resizing along the northeast–southwest axis.
cursor-nwse-resizeIndicates diagonal resizing along the northwest–southeast axis.
cursor-zoom-inIndicates that an element can be zoomed in.
cursor-zoom-outIndicates that an element can be zoomed out.

Tailwind CSS also supports arbitrary cursor values through cursor-[<value>] and CSS custom properties through cursor-(<custom-property>).

Syntax:

<element class="cursor-{value}">...</element>

Replace {value} with a supported cursor value, such as pointer, wait, text, or grab.

Example: In this example, Tailwind CSS is used through its browser CDN to demonstrate different cursor utility classes. Hover over each colored box to observe the cursor change.

HTML
<!--Driver Code Starts-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Tailwind CSS Cursor Classes</title>
    <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
</head>
<!--Driver Code Ends-->

<body class="min-h-screen bg-gray-100 p-8">

    <h1 class="mb-2 text-center text-3xl font-bold text-green-700">
        Tailwind CSS Cursor Classes
    </h1>

    <p class="mb-8 text-center text-gray-600">
        Hover over each box to see the cursor change.
    </p>

    <div class="mx-auto grid max-w-3xl grid-cols-1 gap-5 sm:grid-cols-2">

        <div class="cursor-auto rounded-lg border-2 border-blue-700
                    bg-blue-100 p-8 text-center shadow">
            <h2 class="font-bold text-blue-800">cursor-auto</h2>
            <p class="mt-2 text-sm">Browser-selected cursor</p>
        </div>

        <div class="cursor-default rounded-lg border-2 border-yellow-700
                    bg-yellow-100 p-8 text-center shadow">
            <h2 class="font-bold text-yellow-800">cursor-default</h2>
            <p class="mt-2 text-sm">Default cursor</p>
        </div>

        <div class="cursor-pointer rounded-lg border-2 border-purple-700
                    bg-purple-100 p-8 text-center shadow">
            <h2 class="font-bold text-purple-800">cursor-pointer</h2>
            <p class="mt-2 text-sm">Pointer cursor</p>
        </div>

        <div class="cursor-wait rounded-lg border-2 border-green-700
                    bg-green-100 p-8 text-center shadow">
            <h2 class="font-bold text-green-800">cursor-wait</h2>
            <p class="mt-2 text-sm">Wait cursor</p>
        </div>

        <div class="cursor-text rounded-lg border-2 border-pink-700
                    bg-pink-100 p-8 text-center shadow">
            <h2 class="font-bold text-pink-800">cursor-text</h2>
            <p class="mt-2 text-sm">Text-selection cursor</p>
        </div>

        <div class="cursor-grab rounded-lg border-2 border-indigo-700
                    bg-indigo-100 p-8 text-center shadow">
            <h2 class="font-bold text-indigo-800">cursor-grab</h2>
            <p class="mt-2 text-sm">Grab cursor</p>
        </div>

        <div class="cursor-not-allowed rounded-lg border-2 border-red-700
                    bg-red-100 p-8 text-center shadow">
            <h2 class="font-bold text-red-800">cursor-not-allowed</h2>
            <p class="mt-2 text-sm">Unavailable-action cursor</p>
        </div>

        <div class="cursor-zoom-in rounded-lg border-2 border-teal-700
                    bg-teal-100 p-8 text-center shadow">
            <h2 class="font-bold text-teal-800">cursor-zoom-in</h2>
            <p class="mt-2 text-sm">Zoom-in cursor</p>
        </div>

    </div>

</body>

<!--Driver Code Starts-->
</html>
<!--Driver Code Ends-->
Comment