Label
Coloured status label for tables and lists.
Installation
bun add @xerobi/ui
import { Label } from "@xerobi/ui/label"This component is client-side. In Astro, hydrate it with a client directive.
Examples
Status labels
ActivePendingFailedDraft
import { Label } from "@xerobi/ui/label"
export function LabelStatus() {
return (
<div className="flex flex-wrap gap-2">
<Label color="success">Active</Label>
<Label color="warning">Pending</Label>
<Label color="error">Failed</Label>
<Label>Draft</Label>
</div>
)
}API reference
Label
Status label (a small tinted tag). Built on Badge, with the icon slots the app already uses.
| Prop | Type | Description |
|---|---|---|
| color | "default" | "info" | "success" | "warning" | "secondary" | "primary" | "error" | |
| disabled | boolean | |
| variant | "soft" | "filled" | "outlined" | "inverted" | |
| startIcon | string | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode> | |
| endIcon | string | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode> |