Cursors

34 editing
No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/card-cursors

About this component

A multiplayer card. Three named cursors work on a small canvas together: one drags a card, one resizes a circle and one types a title, on eased, slightly curved paths. Move over the canvas and your own pointer joins as a fourth cursor.

Triggers

  • Continuous
  • Mouse tracking
  • Loop
  • Click
  • Card
  • Ambient

Techniques

  • requestAnimationFrame
  • Event position
  • CSS transition
  • Keyframes
  • State machine
  • Pseudo elements
  • CSS variables

Difficulty

Advanced

Accessibility

Keyboard and screen readers

The shapes are native buttons with aria-labels (Card, Circle, Title) and aria-pressed for the visitor's selection, with a dashed :focus-visible outline. The cursors, flags and avatar stack are aria-hidden; Share is a native <button>.

Reduced motion

The scene holds still at its resting frame and the caret stops blinking.

Use it in anything you build, commercial and client work included. Licence

More cards

See all

Motion that
answers

FieldGet code

Ines Calder

IdenticonGet code
Operating account

19.9%

LedgerGet code

Workspace

No command matches

PaletteGet code