Component packs › Dune › 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.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | ||
doneLabel | string | ||
errorLabel | string | ||
action | () => Promise<unknown> | waits 1.4 s | The work to run; the button stays drained until it settles. Default: waits 1.4 s. |
width | number | 180 | Width in px. Default 180. |
onDone | (ok: boolean) => void | ||
autoplay | number | false | Showcase mode: presses itself every N ms. |
press(): voiddestroy(): voidimport CrumbleButton from './CrumbleButton';
<CrumbleButton />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Toggle switches, Loaders and progress, Physics UI components.