Modus UI

Run Tag

Web (React)

A monospace run tag that fills with theme ink while a command runs, then settles to done or retry.

Show a command's progress inline: the tag fills with ink toward its expected duration while running, washes to the done colour on success, and shakes with a retry action on failure. A live elapsed timer and a screen-reader status line come built in.

pnpm build --filter docs, running
Modus / Run Tag

Installation

CLI

npx @modus-ui/cli add run-tag

Manual

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

Usage

tsx
import { RunTag } from "@/components/ui/run-tag";

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

Props

PropTypeDefaultDescription
iconstring"terminal"-
namestring"pnpm"-
argumentstring"build --filter docs"-
statusstring"running"-
expectedMsnumber2500-
sizenumber34-
radiusnumber6-
colorstring"hsl(var(--foreground))"-
surfaceColorstring"hsl(var(--muted))"-
progressColorstring"hsl(var(--primary))"-
progressOpacitynumber0.16-
doneColorstring"hsl(var(--primary))"-
errorColorstring"hsl(var(--destructive))"-
washOpacitynumber0.14-
shakenumber6-
showTimerbooleantrue-
onRetryany--
styleany--

Comments

  • No comments yet.