CountBadge

Frond
A count beside a label: a circle for one digit, a pill once the number needs the room.

Usage

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.
  • neutral for counts that are just information; primary for something new to look at; inverse on 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

Color
Semantically named colors and a set of ramps for the full palette. Optimized for light and dark.