Interactive cursor
Some products show the hand on everything you can click, others keep the arrow like native buttons. Either works; a mix of both doesn't. Pick one and every clickable element follows it.
12345{ "rules": { "systomic/interactive-cursor": "warn" }}See the difference
className="px-3 py-1.5"className="px-3 py-1.5 cursor-pointer"What doesn't work
2 findings1234567891011121314151617export function SaveButton() { return ( <button type="submit" className="rounded-md px-3 py-1.5"> Save </button> );}
export function Tabs({ onSelect }: { onSelect: (tab: string) => void }) { return ( <div role="tablist"> <div role="tab" className="px-3" onClick={() => onSelect("general")}> General </div> </div> );}systomic/interactive-cursor <button> is clickable but has no cursor-pointer. Clickable elements show the pointer cursor in this product.
systomic/interactive-cursor <div> is clickable but has no cursor-pointer. Clickable elements show the pointer cursor in this product.
What works
No findings123456789101112131415161718192021222324252627export function SaveButton() { return ( <button type="submit" className="cursor-pointer rounded-md px-3 py-1.5 disabled:cursor-not-allowed"> Save </button> );}
/** A deliberate cursor counts: drag handles keep `cursor-grab`. */export function DragHandle() { return <div role="slider" aria-valuenow={0} className="cursor-grab" />;}
/** Links with `href` get the pointer from the browser; text inputs keep the text cursor. */export function Footer() { return ( <footer> <a href="/terms">Terms</a> <input type="email" className="w-full" /> </footer> );}
/** Classes passed in from props may carry the cursor. */export function Trigger({ className, ...props }: { className?: string }) { return <button type="button" className={className} {...props} />;}Details
Clickable elements use one cursor across the product. Some teams want the pointer (hand) on everything you can click, others keep the default arrow like native buttons do. Either is fine; mixing both is not. Pick one with the cursor option.
12"systomic/interactive-cursor": ["warn", { "cursor": "pointer" }] // default"systomic/interactive-cursor": ["warn", { "cursor": "default" }]cursor: "pointer"
12<button className="px-3 py-1.5">Save</button> // reported, fixed:<button className="px-3 py-1.5 cursor-pointer">Save</button>
<button>is clickable but has nocursor-pointer. Clickable elements show the pointer cursor in this product.
The autofix appends cursor-pointer to a plain className string, or adds className="cursor-pointer" when there is none. Any cursor counts as a decision: cursor-grab on a drag handle, cursor-not-allowed, hover:cursor-pointer, or cursor in inline styles and StyleX.
cursor: "default"
12<button className="px-3 cursor-pointer">Save</button> // reported, fixed:<button className="px-3">Save</button>
<button>setscursor-pointer. Clickable elements keep the default cursor in this product, like native buttons.
The autofix removes the class (with any variant). cursor: "pointer" in inline styles and StyleX is reported without a fix.
What counts as clickable
Intrinsic elements only (components set their cursor where they render the element):
button,select,summary,inputof typecheckbox,radio,submit,button,reset,file,range,color,image(text inputs keep the text cursor),role="button","link","tab","checkbox","radio","switch","slider","menuitem","option", …,- any element with
onClick,onPointerDown,onPointerUp,onMouseDownoronMouseUp, <a>withouthrefbut with a click handler. Links withhrefget the pointer from the browser and are left alone.
Not reported: aria-hidden="true" elements, and elements whose classes come from props (className={cn("px-3", className)}, props.className) or that spread props after the class attribute, since those may carry the cursor.
CSS (Stylelint)
Not in the Stylelint preset: a stylesheet can’t see a global reset in another file (button { cursor: pointer }) or classes on the element. Enable it when components are styled in CSS:
1"systomic/interactive-cursor": [true, { cursor: "pointer", severity: "warning" }]pointer: a stateless rule for a class that names a control (.icon-button,.tab-trigger,.menu-item) needs acursorin one of that class’s rules (:hoverand@apply cursor-*count).default:cursor: pointeron those selectors,buttonand[role=…]is reported and removed.