~/css/cursor-generator
CSS Cursor Generator
Hover the preview to try every standard CSS cursor, from pointer and grab to zoom-in and not-allowed, or build a custom circle or arrow cursor in your own colour and size. The CSS always includes a keyword fallback.
Move your mouse over this area
pointerUsing the CSS Cursor Generator
Cursors tell people what will happen
The cursor is a promise: pointer means clickable, text means selectable, grab means draggable, not-allowed means disabled. Using the right keyword makes an interface feel predictable. Using pointer on things that are not clickable does the opposite.
Custom cursors
The cursor property accepts an image URL, including an inline SVG data URI like the one this generator writes, followed by the hotspot coordinates and a keyword fallback. The hotspot is the exact point that clicks: the centre for a dot, the tip for an arrow.
Size limits
Browsers cap custom cursor images, commonly at 128 by 128 pixels, and some reduce larger images. Keep custom cursors small, around 24 to 32 pixels, so they feel precise.
Use sparingly
A custom cursor across a whole site can feel slow and confuse people who rely on the system cursor, especially with accessibility settings that enlarge it. Use custom cursors for specific areas such as a canvas, a game or a gallery.
Which cursor should a button use?
Browsers show the arrow over buttons by default, and many design systems add cursor: pointer so buttons feel clickable like links. Either is acceptable as long as you are consistent. Use not-allowed on disabled controls, grab and grabbing on things that can be dragged, and text only where text can be selected or typed.
Hotspots on custom cursors
A custom cursor image has a hotspot: the exact pixel that does the clicking. It is set by the two numbers after the image URL, for example url(dot.svg) 8 8, auto for a 16-pixel dot whose centre should click. Without them the top-left corner is the hotspot, which makes a round cursor feel as if it clicks slightly off target.
Frequently asked questions
Why is a fallback keyword required?
The CSS specification requires a keyword at the end of the cursor list, used if the image fails to load.
Do custom cursors work on touch screens?
No. Touch devices have no cursor, so make sure nothing depends on it.
Can I animate a cursor?
Not with the cursor property. Animated cursors need a JavaScript-driven element that follows the mouse.
Can I set a cursor on the whole page?
Yes, by putting the rule on body or html. Links, buttons and inputs keep their own cursors because browsers set those on the elements themselves, so you may need to repeat the rule for them if you want one cursor everywhere.
Does cursor: none hide the cursor completely?
It hides it over the element that has the rule. It is useful for full-screen video or games, but on ordinary pages it leaves people unable to see where they are pointing, so use it only where you draw your own pointer.