Badge
Compact pill label in four semantic variants.
DefaultSecondaryOutlineDestructive
Usage
import { badge } from "coatx/badge";
export const StatusBadges = () => (
<>
<span {...badge()}>Default</span>
<span {...badge({ variant: "secondary" })}>Beta</span>
<span {...badge({ variant: "outline" })}>MIT</span>
</>
);
Exports (coatx/badge)
| Export | Description |
|---|---|
badge(options?) |
Badge pill recipe |
badgeStyles |
Compiled StyleX style map |
Options
| Option | Type | Default |
|---|---|---|
variant |
"default", "secondary", "destructive", "outline" |
"default" |