Skip to content

No.222 · Cursors

Tether

A name tag on a lanyard. Pick it up from its nail and it hangs from your cursor on a real rope, trailing, swinging when flung and settling like a pendulum. Click anywhere to hang it on a fresh pin; brush past it and it sways. The tag stays a real, clickable link.

The prompt

Copy this text

Automatic copying is unavailable. Copy the selected text using your device’s copy command.

Written for the variant you picked above: Paper

Build a cursor companion: a name tag hanging on a rope that you can carry with the pointer and hang anywhere in its host. Physics: a 14-point Verlet rope, 9px between points, gravity 2200px/s², velocity damping 0.989, fixed 1/120s steps from an accumulator, and 10 constraint passes per step. Point 0 is pinned (inverse mass 0); the last point carries the tag and has inverse mass 0.35, so the card is heavier than the cord and pulls it straight. The tag's rotation follows the angle of the last two segments, −atan2(dx, dy), through its own spring (k 140, c 9), so it lags and over-swings slightly like a real card. The loop sleeps once the rope's kinetic energy and the tag's angular speed have been near zero for 400ms, and wakes on movement. Modes: hung (pin at a fixed nail) and carried (pin = the pointer, written in pointermove). The nail is a real button (aria-pressed, "Pick up the name tag" / "Hang the name tag here") drawn as a brass pin head; clicking it picks the tag up. While carried, the system cursor is hidden inside the host and a small metal clip is drawn at the pointer; the button rides under the pointer, so any click hangs the tag right there (clamped inside the host); Escape hangs it in place; leaving the host hangs it at the edge. Because the pin is always where the pointer is when the mode changes, the rope never jumps. While hung, a pointer moving through the cord (within 16px of a point) or across the card nudges those points by its velocity, so brushing past makes it sway. Drawing: the cord is an SVG path through the points with quadratic curves via the midpoints, a 4.5px round-capped band with a soft drop shadow; the card is an <a> (176px, 14px radius, layered shadow) translated to the last point with transform-origin at its top centre and a metal ring there. Coordinates are host-local and corrected for scaled hosts. Focusing the card hangs it so it can be activated. Paper (blue lanyard) and Night (orange). Selected variant — Paper (paper): Palette for this theme (Paper): --tt-card #fffdf8; --tt-ink #1c1b17; --tt-line rgb(0 0 0 / 0.1); --tt-nail radial-gradient(circle at 35% 30%, #fff6d8, #c9a25a 45%, #7d5f2a 100%). Treat these as the root colour tokens, one value per role, and name them to suit your code. Select it with the theme option set to "paper". Keep every dimension, spacing value, state and motion from the brief unchanged, and keep text at 4.5:1 contrast or better on these surfaces. This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Click the nail to pick the tag up and move around; click anywhere to hang it there, or press Esc. Brush past a hanging tag to make it sway; click the tag to open the link. Motion: Verlet rope at 120Hz; tag rotation on a spring (k 140, c 9); nail and clip 140–180ms. Accessibility: The nail is a button with an aria-pressed state and a label that says what it will do; the tag is a normal link, reachable by Tab, and focusing it while carried hangs it first. The rope and clip are aria-hidden. Reduced motion hangs the cord straight with no simulation; carrying moves the tag rigidly with the pointer. Responsive behavior: The nail is placed by fractions of the host and re-placed on resize; the tag is clamped inside the host. Touch: On touch the tag hangs from its nail and swings when the nail is tapped; it stays a normal link. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.

Notes

Interaction
Click the nail to pick the tag up and move around; click anywhere to hang it there, or press Esc. Brush past a hanging tag to make it sway; click the tag to open the link.
Motion
Verlet rope at 120Hz; tag rotation on a spring (k 140, c 9); nail and clip 140–180ms.
Accessibility
The nail is a button with an aria-pressed state and a label that says what it will do; the tag is a normal link, reachable by Tab, and focusing it while carried hangs it first. The rope and clip are aria-hidden. Reduced motion hangs the cord straight with no simulation; carrying moves the tag rigidly with the pointer.
Responsive
The nail is placed by fractions of the host and re-placed on resize; the tag is clamped inside the host.
On touch
On touch the tag hangs from its nail and swings when the nail is tapped; it stays a normal link.