Muse Button
Web (React)
A canvas busy-state button in the theme's ink, with a comet tracing its border, a dot spinner and a shimmering serif label.
A Canvas 2D busy-state button inked in the theme's primary colour. A comet of the same colour laps the border, a six-dot spinner ticks beside the label, and a shimmer sweeps across an italic word set in the Modus heading face. The scene is transparent so it sits on the page, and colours are re-read when the theme or palette changes. It fills its positioned parent, pauses when off screen or when the tab is hidden, and holds a still frame when the user prefers reduced motion.
Installation
CLI
npx @modus-ui/cli add muse-buttonManual
- Copy the code from the component tab.
- Create a file at
components/ui/muse-button.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | "Composing" | Word drawn on the button. |
backgroundColor | string | undefined | Scene background colour; transparent when omitted. |
plateColors | [string, string, string] | a ramp of the theme's primary | Plate gradient stops, top to bottom. |
hue | number | 0 | Hue rotation in degrees (-180 to 180). |
saturation | number | 1 | Saturation multiplier (0 to 2). |
brightness | number | 1 | Brightness multiplier (0.35 to 1.65). |
Comments