Onion Skin

Ball bounceFrame 12 / 24
No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/card-onion-skin

About this component

An animator's card on a light table showing one frame of a bouncing ball: hover to turn the onion skin on and the frames before and after appear as ghosts along the arc, and move across the picture to scrub through all 24 frames, squash and stretch included.

Dependencies
None
Difficulty
Intermediate
Reduced motion
Respected
Theme
Light and dark
Follows page color-scheme

Triggers3

  • Hover
  • Mouse tracking
  • Card

Techniques4

  • SVG
  • Event position
  • CSS variables
  • State machine

Accessibility

Keyboard and screen readers

The picture is a focusable slider (role="slider") over frames 1 to 24; arrow keys step and focus turns the onion skin on.

Reduced motion

Nothing moves on its own: frames change only as you scrub, and under prefers-reduced-motion the onion skin appears without fading in.

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

More cards

See all
OvergrownGet code
PanoramaGet code
Order #2291
  • Ceramic mug × 2
  • Linen tea towel
3 items · 1.2 kg
ParcelGet code
LIVE

Orkney switches on Europe's largest tidal array

Energy desk12 min ago
PerimeterGet code