Fold-up

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/checkbox-fold-up

About this component

A check box, literally: a flat cardboard net folds up in 3D into a box, sides first, then the front and back, and last the lid swings over and closes with a bounce, showing a tick on top. Clearing unfolds it.

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

Triggers3

  • Click
  • State change
  • 3D

Techniques5

  • preserve-3d
  • 3D transform
  • Perspective
  • Transition delay stagger
  • stroke-dashoffset

Accessibility

Keyboard and screen readers

A native checkbox inside a <label>, so Space toggles it and the visible label names it; :focus-visible on the input outlines the scene.

Reduced motion

The box folds at once.

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

More checkboxes

See all
FrostGet code
GestureGet code
IceGet code

Email me when , when , and .

InlineGet code