Guides

Attributes

Opt elements in and out, and add labels and arrows, with data attributes.

data-cursor="native"

Marks a region where the custom cursor should yield to the native cursor. Use it for embedded editors, maps, canvases, video players, and forms you couldn’t scope away from. Test the result alongside your site’s own cursor CSS.

<div class="map" data-cursor="native">…</div>

On <html> it turns the custom cursor off everywhere, for both sets. That’s how the “Use default cursor” toggle works.

data-cursor="hover"

Marks a custom clickable element as a hover target, for example a div with a click handler. Real links and buttons don’t need it.

<div class="card" data-cursor="hover" onclick="open()">…</div>

(Better still, make it a real <button> or <a>, which keyboard and screen-reader users need anyway.)

data-cursor-label="…" (Animated)

Shows a pill label on hover: View, Drag, Play, Open, Close, Next, Back. Keep it to one or two words. Never put information only in the label; the same meaning must be visible on the page.

<a href="/work/atlas" data-cursor-label="View">Atlas, a case study</a>

Label text is whitespace-collapsed and cut to 24 characters by the runtime, and is set as text, never HTML.

data-cursor-direction="left|right|up|down" (Animated)

Shows an arrow, for carousels and scroll hints.

<button class="prev" data-cursor-direction="left" aria-label="Previous slide">…</button>

Which elements get the hover cursor

Links with href (except those with aria-disabled="true"), area[href], enabled buttons, [role="button"] (unless aria-disabled="true"), summary, label, enabled selects, enabled checkbox/radio/submit/button/reset/image inputs, and [data-cursor="hover"] are hover targets. Explicitly marking an element can override those exclusions. Animated cursors also treat an element with a computed cursor: pointer as a hover target, unless a native region or another yield condition takes precedence.

In the Static set, hover selectors match descendants of the scope, not the scope element itself. Plain text and contenteditable areas can show the custom cursor rather than an I-beam; opt them out when needed.