Flex

MemberKiln & Co clubRowan HartNo. 0042 · Valid 11/27
No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/card-flex

About this component

A membership card in thin, springy plastic: grab it and drag sideways and it bows into a curve, the edges coming toward you and catching the light; let go and it springs back flat, wobbling once or twice like real card stock.

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

Triggers4

  • Mouse tracking
  • Spring
  • 3D
  • Card

Techniques4

  • preserve-3d
  • 3D transform
  • requestAnimationFrame
  • Spring

Accessibility

Keyboard and screen readers

The card is a focusable group labelled with the member's name and number, all of it real text in the middle copy; the other slices are aria-hidden. Arrow keys flick it.

Reduced motion

It bends only while you drag and springs straight back without wobbling.

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

More cards

See all

New message

To Mara Lind

Here are the frames from Friday. The second pass is much calmer, see what you think.

Saved 2 min ago
GenieGet code
Night runThu 21:40 · Riverside
8.4km
41:12time
4:54/km
GlowGet code
HangingGet code
InfraredGet code