Component packs › Shuffle › Flip Toggle

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.

Flip Toggle props

PropTypeDefaultDescription
checkedboolean
disabledboolean
rankstringThe face shown when on.
suit'S' | 'H' | 'D' | 'C'
labelstringAccessible name.
widthnumberCard width in px.
onChange(checked: boolean) => void
autoplaynumber | falseShowcase mode: toggles itself every N ms while visible.

Methods on the ref

Use it in React

import FlipToggle from './FlipToggle';

<FlipToggle />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Shuffle

Good for: Skeuomorphic UI.