Component packs › Dune › Crumble Button

Crumble Button

Press it and the whole face, label too, collapses into a pile of sand, then rises back grain by grain into its new label.

Crumble Button is a button from Dune, a component pack with 6 sand controls: Controls made of real sand: every grain falls, tumbles and piles up. Price: $2 for the whole pack.

Built with: face to grains, each grain flies home, async action.

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.

Crumble Button props

PropTypeDefaultDescription
labelstring
doneLabelstring
errorLabelstring
action() => Promise<unknown>waits 1.4 sThe work to run; the button stays drained until it settles. Default: waits 1.4 s.
widthnumber180Width in px. Default 180.
onDone(ok: boolean) => void
autoplaynumber | falseShowcase mode: presses itself every N ms.

Methods on the ref

Use it in React

import CrumbleButton from './CrumbleButton';

<CrumbleButton />

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

More in Dune

Good for: Toggle switches, Loaders and progress, Physics UI components.