CSS Cursors — Types and Custom Cursor Guide
The cursor Property
The CSS cursor property controls the mouse pointer that appears when a user hovers over an element. A clear cursor can communicate whether something is clickable, draggable, disabled, zoomable, or simply informational.
Good cursor choices improve usability, but they should support the interface rather than replace good labels and layout. If everything gets a fancy cursor, users stop trusting what it means.
Common Cursor Values
| Value | Meaning | Typical Use |
|---|---|---|
default | Regular arrow pointer | Normal page content |
pointer | Hand cursor | Buttons, links, interactive cards |
text | Text selection cursor | Editable or selectable text |
move | Move indicator | Drag-and-drop interfaces |
not-allowed | Action unavailable | Disabled controls |
grab / grabbing | Draggable item | Sliders, canvas panning, sortable lists |
wait | Busy state | Temporary loading states |
zoom-in | Can enlarge | Image viewers or previews |
Practical Examples
button {
cursor: pointer;
}
input[disabled],
button[disabled] {
cursor: not-allowed;
}
.article-copy {
cursor: text;
}
.draggable-card {
cursor: grab;
}
.draggable-card:active {
cursor: grabbing;
}
.image-preview {
cursor: zoom-in;
}
<button>Save</button>
<button disabled>Delete</button>
<p class="article-copy">Select this text.</p>
<div class="draggable-card">Drag me</div>
<img class="image-preview" src="photo.jpg" alt="Preview image">
Custom Cursor Images
You can use a custom image as the cursor with url(), followed by a fallback keyword. This is useful for specialized tools such as drawing apps or games, but it should be used carefully because custom cursors can feel distracting or inconsistent across devices.
.drawing-surface {
cursor: url('brush.cur'), crosshair;
}
The fallback keyword is important because the browser may ignore unsupported cursor file formats or oversized assets.
Best Practices
FAQ
Frequently Asked Questions
- The cursor property changes the mouse pointer shown over an element.
- Choose cursor values that match the real behavior of the element.
- pointer, text, move, not-allowed, grab, and zoom-in are common practical values.
- Custom cursor images should always include a fallback keyword.
- Cursors improve clarity, but they should never be the only signal for interactivity.
Level Up Your Css Skills
Master Css with these hand-picked resources