Pour Toggle
FREETip the bowl: a splash falls, and the new theme ripples out from where it lands.
React 19Tailwind 4added 2026-12-05
live preview · pour toggle
click to pour · alt-click for system
Installation
Into your bowl in one line.
The CLI drops the source straight into your project. You own every line; there’s no package to update.
- 01
Add it with the CLI
$ npx bowls@latest add pour-toggle - 02
Serve it
Paste the source into
components/bowls/pour-toggle.tsxand import it — the Code tab’s demo.tsx shows a full example.
Props
| PROP | TYPE | DEFAULT | WHAT IT DOES |
|---|---|---|---|
| storageKey | string | "theme" | localStorage key that remembers the choice. |
| attribute | string | "data-theme" | Attribute set on <html> to light or dark. |
| duration | number | 1500 | Length of the splash and ripple, in ms. |
| size | number | 44 | Button size, in px. |
| onChange | (theme) => void | — | Called after each switch. |