Component packs › Shuffle › Flip Toggle
The card lifts off the table, turns face up on a spring and lands with a little overshoot, its shadow growing in the air and narrowing edge-on.
Flip Toggle is a toggle from Shuffle, a component pack with 6 card controls: Loaders, menus, lists and pickers made of playing cards. Price: $2 for the whole pack.
Built with: lift to flip, edge-on shadow, real pips.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | ||
disabled | boolean | ||
rank | string | The face shown when on. | |
suit | 'S' | 'H' | 'D' | 'C' | ||
label | string | Accessible name. | |
width | number | Card width in px. | |
onChange | (checked: boolean) => void | ||
autoplay | number | false | Showcase mode: toggles itself every N ms while visible. |
readonly checked: booleansetChecked(v: boolean, silent?: boolean): voiddestroy(): voidimport FlipToggle from './FlipToggle';
<FlipToggle />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Skeuomorphic UI.