Elastic

Requires framer-motion
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/radio-elastic

About this component

A rubber-band selection pill stretches horizontally as it springs between options via Framer Motion layoutId with high-stiffness spring physics. The distortion gives a tactile elastic band feel to the transition.

Triggers

  • Click
  • State change
  • Spring

Techniques

  • Transform only

Difficulty

Advanced

Moves on

Its code uses this curve. Open one to see it plotted and tune it.

Accessibility

Keyboard and screen readers

Hidden native <input type="radio"> per option.

Reduced motion

Framer Motion respects prefers-reduced-motion automatically.

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

More radios

See all
GravityGet code
HologramGet code