ComponentSite and product
Badge
Status labels, product tags, and site chips.
npx context-ds add badgeUsage
Use it for
A run's or monitor's status (default for paused or queued, brand running, success, warning skipped, destructive failed), tag for a tag, chip for the site's pill-shaped labels.
Avoid
- Badges as buttons
- More than one tone per row
Dependencies: @radix-ui/react-slot, class-variance-authority
Example
examples/badge.tsx
Source
components/ui/badge.tsx
Reference: context-dashboard c0ddf7a src/components/monitors/monitor-status.tsx; src/components/ui/form.tsx; website src/components/sections/home/product-grid.tsx (chip).