Modus UI

State Glyph

Web (React)

A small ring that shows pending, running, done, failed or cancelled with drawn transitions.

Marks take the foreground ink, turn to the primary colour when done and the destructive colour on failure, with mono labels that strike through on completion.

TypesetProofingImposingPlate checkBind
Modus / State Glyph

Installation

CLI

npx @modus-ui/cli add state-glyph

Manual

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

Usage

tsx
import { StateGlyph } from "@/components/ui/state-glyph";

export default function Example() {
  return <StateGlyph />;
}

Props

PropTypeDefaultDescription
statusstring"pending"-
progressany--
labelany--
colorstring"hsl(var(--foreground))"-
doneColorstring"hsl(var(--primary))"-
errorColorstring"hsl(var(--destructive))"-
sizenumber20-
strokeWidthnumber2-
dashesnumber12-
fontSizenumber14-
spinDurationnumber1100-
arcLengthnumber0.68-
drawDurationnumber240-
fillOpacitynumber0.14-
strikebooleantrue-
strikeDelaynumber60-
styleany--

Comments

  • No comments yet.