Badge
display
Badge: a short inline label with a colored background
Terminal
$termuijs render badge
Installation
$ bunx termuijs add badge
Copies the source into src/components/badge/ and installs @termuijs/core, @termuijs/widgets.
Usage
ts
import { Badge } from '@termuijs/widgets'ts
new Badge(text: string, style?: Partial<Style>, opts?: BadgeOptions)API Reference
Badge
| Prop | Type | Required | Description |
|---|---|---|---|
text | string | required | — |
variant | BadgeVariant | optional | Variant determines background color |