Cursor adds an ink ring that eases after the pointer on desktop-class pointers. It never replaces the native pointer, so system cursor sizes and high-contrast cursors keep working. Over a control it grows to 44 px, pressed it shrinks, over a field it hides. An element with data-mk-cursor-label shows a label chip beside the ring; labels only repeat what the element says. Mount it once in the root layout.
Example#
Usage#
Use the cursor on pages where play is the point, such as the home page and the playground (D-H5). It adds an ink ring that eases after the pointer on desktops; it never replaces the native pointer, so system cursor sizes and high-contrast cursors keep working.
- Mount it once, in the layout of the pages that use it.
- Behaviour. Over a control it grows to 44 px, pressed it shrinks, over a field or a frame it hides.
- Labels. An element with
data-mk-cursor-labelshows a label chip beside the ring, such as "Drag" on the block pile; labels only repeat what the element says. - Off at Quiet, under reduced motion and under forced colours.
Anatomy#
- Ring2 px ink with a paper outline, readable on any plate.
.mk-cursor-ring - Label chipRepeats what the element says.
.mk-cursor-label
Volume#
Off at Quiet; on from Studio (10 §5.1). The ring itself does not change.
Quiet
Studio
Press
Rave
Content#
- Labels are one verb: "Drag", "Play". Never instructions people need, since touch screens never see them.
Do and don't#
Do
Don't
A custom cursor that hides the native pointer on a form page.
Accessibility#
- Hidden from assistive tech and from pointer events.
- Off at Quiet, under reduced motion (the OS or the site's own setting) and under forced colours.
- One animation frame loop while it travels, none at rest.
The colour pairs it prints, with their contrast on both papers:
| Text | Surface | Role | Bone | Night |
|---|---|---|---|---|
--mk-on-slab | --mk-slab | label | 16.49:1 · Lc 98.7, passes | 16.21:1 · Lc 95.1, passes |
Props#
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | none | |
specimen | { readonly state?: "rest" | "active" | "pressed"; readonly label?: string; } | none | Docs and press frames only: the ring (and a label) printed in place, never following anything. |
Tokens#
System tokens (12)
--mk-border--mk-dur-hover--mk-ease-out--mk-font-text--mk-radius-pill--mk-space-2--mk-surface--mk-text--mk-type-label-leading--mk-type-label-size--mk-type-label-weight--mk-z-cursor
Its own properties (2)
--mk-cursor-label-pad--mk-cursor-scale
Changelog#
Arrived in 0.9.0.
- Motion: the additive
Cursorand the first-visitPressRun(in./motion). Read the whole entry