CountBadge
FrondUsage
The import, then a use to start from. Both copy as they are.
Import
import { CountBadge } from "@/components/ui/count-badge";Example
<Button variant="ghost" size="sm"> Reviews <CountBadge count={1} variant="primary" /></Button>When to use
Use it for
- A number beside the label it counts: a tab's items, files changed, reviews waiting.
neutralfor counts that are just information;primaryfor something new to look at;inverseon a solid dark button.
Avoid
- A label or a status in words: use
Badge. - A count with no label next to it.
Accessibility
Checks
- The label beside it says what is counted, so the number never stands alone.
API
Read from each component's stories, the same source as COMPONENTS.md, and kept in step by check:design-system.
CountBadge
Its stories don't declare
argTypes, so no props are listed. The variants show its states.VariantsDefaultPrimaryWidthsInButtons
Keep going
- BadgeStatic labels and counts. Neutral by default; status hues only when the badge is the status.Frond
- ButtonEvery clickable. Variants: default, outline, ghost, ghostMuted, destructive, destructiveOutline, link.Frond
Color
Semantically named colors and a set of ramps for the full palette. Optimized for light and dark.