Fold
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/button-foldAbout this component
The button is a sheet of paper. A click folds the top half down over the bottom like a letter, its underside showing and the crease casting a shadow; it holds folded while the label changes underneath, then unfolds with the new label. Hover lifts the top flap a little to say it can fold.
Triggers
- Click
- Hover
- 3D
- State change
Techniques
- preserve-3d
- Perspective
- 3D transform
- State machine
Difficulty
Advanced
Accessibility
Keyboard and screen readers
The button's aria-label tracks the current label; the paper halves are aria-hidden.
Reduced motion
The label changes instantly and the hover lift is off.
Use it in anything you build, commercial and client work included. Licence