Flip Card

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/radio-flip-card

About this component

Plan cards that flip. Choosing one turns it over in 3D with a springy settle to reveal its lit back (a tick, the plan and "Selected"), while the card you had before flips back to its front. Pure CSS.

Triggers

  • Click
  • State change
  • 3D
  • Card

Techniques

  • preserve-3d
  • 3D transform
  • Perspective

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

Real native radios (visually hidden: absolute, 1x1, opacity 0) inside <label>s in a role="radiogroup" with an aria-label, so arrow keys, focus and screen readers work. A visually hidden span gives each option its name and price.

Reduced motion

The changes are instant.

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

More radios

See all
FoldersGet code
LayoutGet code
MoodGet code
SeatGet code