Component packs › Slate › Chalk Button
The box is hatched in coloured chalk while your action runs, then ticked, then rubbed clean.
Chalk Button is a button from Slate, a component pack with 6 chalkboard components: Controls written in chalk on a slate: strokes that draw themselves and rub out to dust. Price: $2 for the whole pack.
Built with: async action, hatch strokes in sequence, dust after wipe.
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 | ||
done | string | ||
failed | string | ||
action | () => unknown | ||
width | number | 280 | Board width in px. Default 280. |
dark | boolean | ||
autoplay | number | false | Showcase mode: presses itself every N ms while visible. |
press(): Promise<void>destroy(): voidimport ChalkButton from './ChalkButton';
<ChalkButton />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Checkboxes.