Contributing
Art style guide
How every cursor is drawn, so the set feels like one hand made it. For contributors.
Adapted from the draft
docs/art-style-guide.mdin the repository. Implementation notes below reflect the current generator.
Version 0.1, draft. Follow this for every family so the set feels like one hand drew it, and so the Static generator can turn each drawing into three colour variants without manual fixes. Related: PRD sections 8.2, 8.4 and 8.9.
1. Canvas
- 32 × 32 px, with
viewBox="0 0 32 32"andwidth="32" height="32"written out. Explicit dimensions avoid inconsistent sizing of SVG cursor images. - 1 px no-ink margin on every edge. Nothing, including the keyline, touches pixels 0 or 31.
- Draw at 1×. Don’t draw large to compensate for pointer scaling; test the result in your target browsers and operating systems.
- Keep straight horizontal and vertical edges on whole-pixel coordinates so they stay sharp at 1×. Diagonals and curves can fall anywhere.
2. Size: match native optically
A custom cursor should feel about as big as the system one. Any bigger reads as decoration, and any smaller hurts low-vision users.
| Archetype | Normal: visible size incl. keyline | Hover |
|---|---|---|
| Arrow / pointer (bold, line, hollow, soft, pixel, sketch, design-tool, paper-plane) | 22–24 px tall | Same footprint ±2 px |
| Centered mark (dot, circle, plus, star, diamond) | 18–22 px across | 26–30 px across |
Centered marks have no arrow silhouette to anchor them, so they need more area than an arrow to read as a cursor. Below 18 px they look like a stray speck. Hover tops out at 30 px, the most the canvas allows inside its margin.
Check every new family next to the native arrow at 100 % zoom before finishing.
3. Construction: keyline under fill
Every cursor is made of two layers with the same geometry. That way the keyline is always exactly 2 px outside the fill, and the files export cleanly from any tool.
Solid shapes (bold arrow, dot, diamond…)
- Keyline layer: the shape, filled with
keylineand given a 4 px centred stroke inkeyline, round join. That puts 2 px outside the fill. - Fill layer: the same shape on top, filled with
fill, no stroke.
Stroked shapes (line arrow, hollow circle, plus…)
- Keyline layer: the path stroked in
keylineat line width + 4 px, round caps and joins. - Fill layer: the same path stroked in
fillat the line width.
Don’t use Figma or Illustrator “outside stroke” in the final file. It exports as masks or expanded outlines that the generator can’t recolour reliably.
4. Strokes and corners
- Keyline: 2 px visible, every family, no exceptions (PRD 8.9).
- Line width for stroked families: 2 px. Thinner lines drop out at 1×. Note that a “thin” line arrow still reads as a 6 px band (keyline 2 + line 2 + keyline 2), so it’s thin relative to the bold arrow, not hairline.
- Smallest detail and smallest gap: 2 px. Anything smaller blurs into the keyline at 1×.
- Corner radius comes from one scale, and each family picks one value and uses it everywhere:
sharp 0·soft 1 px·round 2 px·pill = half the heightThe keyline layer always uses round joins regardless, so tips don’t spike.
5. Hotspots
The hotspot is the pixel that clicks. It must sit exactly on the visible tip (PRD 8.4).
- Arrows and pointers: the hotspot is the tip of the fill geometry (not the keyline’s outer edge), on a whole-pixel coordinate. Default
4 4, which leaves room for the keyline and margin. For stroked arrows (line, hollow, sketch), use the stroke’s centreline vertex. - Layered marks: when one part sits inside another (a ring around a plus, an outline around a centre), make their keylines overlap. A gap of under 2 px shows as a hairline seam.
- Centered marks:
16 16. Draw the shape symmetrically around that point, using even diameters so edges land on whole pixels. - Hover keeps the normal hotspot whenever the shape allows, so switching states never makes the cursor jump.
- Record each state’s hotspot in
meta.json(section 9). Never assume the default. - Test each one by clicking 1 px targets in the Cursor Lab.
6. Normal vs hover
- Hover must be recognisable without colour. Change the shape, size or fill state, never only a colour. Colour shifts with each variant, and colour alone fails colour-blind users.
- Use at least one of these: grow ≥ 30 %, hollow → filled, or an added mark (dot, notch, chip).
- Keep it clearly the same family: same corner radius, line width and keyline.
7. Colour tokens and variants
Use only these three colour tokens where needed, written as exact hex values in the light variant. The generator finds and replaces them, so no other colour, opacity, gradient or shadow may appear in the file.
| Token | Draw with | Light (for light pages) | Dark (for dark pages) | Accent |
|---|---|---|---|---|
fill |
#111111 |
#111111 |
#FFFFFF |
the site accent |
keyline |
#FFFFFF |
#FFFFFF |
#111111 |
#FFFFFF or #111111, whichever contrasts more with the accent |
accent |
#2F6BFF |
the site accent | the site accent | same as accent keyline |
- Fill and keyline must contrast at ≥ 3:1 (WCAG 1.4.11). The generator rejects a fill–keyline pair that fails; this does not check contrast against the page background.
accentis for small details only, never for the main body or the only hover cue.
8. SVG rules
- Allowed elements:
path,circle,ellipse,rect,polygon,polyline,line,g. - Not allowed:
filter,mask,clipPath, gradients,opacity/fill-opacity,<style>,<text>,<image>, external references,transformon the root (flatten instead). - Write colours as attributes (
fill="#111111"), not CSS. - Run SVGO (or similar) on export, but keep the width and height attributes.
9. Files and metadata
art/families/<family>/
<family>-normal.svg
<family>-hover.svg
meta.json
Family ids are kebab-case, for example bold-arrow. Start from art/_template/ in the repository.
{
"id": "bold-arrow",
"name": "Bold arrow",
"set": "static",
"archetype": "arrow",
"corner": "round",
"states": {
"normal": { "hotspot": [4, 4] },
"hover": { "hotspot": [4, 4] }
}
}
10. Family exceptions
- Pixel arrow: straight edges only, every vertex on whole pixels, square joins, and a keyline drawn as a stepped 2 px outline. Add
shape-rendering="crispEdges". - Sketch arrow: wobble the edges, but keep the tip crisp and on a whole pixel, and keep the keyline unbroken with no gaps.
- Animated set: these shapes are mostly drawn in code. Shapes that do get drawn (arrows, the brand slot) still follow sections 3–7.
11. Before a family is done
- 32 × 32 with width and height set, nothing on the outer pixel
- Only the three token hex values in the file; passes the section 8 rules
- Looks right at 1× next to the native arrow on white, black,
#808080and a busy photo - Still crisp at 2× and at a 250 % OS pointer size
- Hotspot lands on the tip, tested in the Cursor Lab
- Hover can be told apart in greyscale
-
meta.jsonfilled in
Open items for the author
- Native-size target. Confirm 22–24 px for arrows after comparing against macOS and Windows arrows side by side.
- Drop shadows. Native macOS cursors have one. They’re left out for now because filters are untested in cursor images; worth a Cursor Lab test.