Modus UI

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.

Modus / Muse Button

Installation

CLI

npx @modus-ui/cli add muse-button

Manual

  1. Copy the code from the component tab.
  2. Create a file at components/ui/muse-button.tsx.
  3. Paste the code.

Usage

tsx
import { MuseButton } from "@/components/ui/muse-button";

export default function Example() {
  return (
    <div className="relative h-[400px] w-full overflow-hidden">
      <MuseButton />
    </div>
  );
}

Props

PropTypeDefaultDescription
labelstring"Composing"Word drawn on the button.
backgroundColorstringundefinedScene background colour; transparent when omitted.
plateColors[string, string, string]a ramp of the theme's primaryPlate gradient stops, top to bottom.
huenumber0Hue rotation in degrees (-180 to 180).
saturationnumber1Saturation multiplier (0 to 2).
brightnessnumber1Brightness multiplier (0.35 to 1.65).

Comments

  • No comments yet.