Reference
Performance and sizes
What each set costs, measured from the build.
Static
- Zero JavaScript for the cursor itself. The browser draws it without an animation loop.
- One CSS file per cursor. In the current built-in, inline build, files range from roughly 2.8–7.2 KB raw and 0.7–1.2 KB gzipped. Separate-file output also requires the SVG assets.
Animated
Approximate gzipped sizes from the bundled build. npm run build checks budgets for the loader, entry, runtime, each family and the combined family download; shared chunks have no individual budget.
| File | Size | Budget | Who downloads it |
|---|---|---|---|
index.js (loader) |
~0.6 KB, ~0.8 KB with its chunks | 1 KB | everyone who loads the module |
auto.js (script-tag entry) |
~0.5 KB | 1 KB | script-tag sites |
cursor.js (runtime) |
~5.1 KB | 5.25 KB | eligible pointer devices |
families/<name>.js |
0.1–0.6 KB | 1 KB each | eligible pointer devices, chosen family only |
The loader fetches the runtime and chosen family only for a fine, hover-capable primary pointer without blocking contrast settings. A script-tag installation also downloads auto.js; actual totals depend on the family, shared chunks, bundler and caching.
Runtime cost
- One
requestAnimationFrameloop runs while the pointer moves and while animation settles, plus a short tail. Browsers normally pause animation frames in hidden tabs. - Position is written with
transform. Pointer target and computed-style checks happen outside the frame loop. - Passive listeners and delegated hover detection; no
stopPropagation. - Easing is frame-rate independent.
- No
mix-blend-mode,backdrop-filteror animated shadows on the cursor. - A frame-time monitor steps down when frames stay slower than about 33 ms: first it drops smoothing and trails, then it hands back to the native cursor.
In React
The cursor runtime does not update React state on pointer moves; it does not itself cause React re-renders.