Component packs › Minted › Coin Flip Toggle

Coin Flip Toggle

The coin is tossed across the track, turns three half turns to land on its other face and wobbles flat.

Coin Flip Toggle is a toggle from Minted, a component pack with 6 savings components: Savings and payment controls with metal coins that flip, stack, drop and pile up. Price: $2 for the whole pack.

Built with: toss arc, face from the flip, settling wobble.

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.

Coin Flip Toggle props

PropTypeDefaultDescription
checkedboolean
disabledboolean
labelstringAccessible name, e.g. "Round up purchases".
metalMtMetalgoldCoin metal. Default gold.
onChange(checked: boolean) => void
autoplaynumber | falseShowcase mode: toggles itself every N ms while visible.

Methods on the ref

Use it in React

import CoinFlip from './CoinFlip';

<CoinFlip />

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

More in Minted

Good for: Pricing and payment.