Skip to content

Counter ​

Compact numeric count badge. Use for unread counts, selected-item totals, and other small quantity indicators — not for interactive steppers or form number inputs.

Overview ​

The catnip-counter custom element shows a rounded count pill.

PropRole
valueNumber or string shown inside the badge
appearanceprimary or secondary
disabledVisually mutes either appearance
sizeDensity s, m (default), or l

Live example ​

Guidelines ​

When to use ​

  • Show a compact count next to a label, tab, list row, or control (for example unread items or selected filters).
  • Prefer primary when the count should carry brand emphasis; use secondary on busy or already-coloured surfaces. Add disabled to visually mute either appearance.

When not to use ​

  • Do not use Counter to increment or edit a value — use Number Input or a dedicated stepper when those ship.
  • Do not use Counter as a status label — use Status.
  • Do not use Counter for removable or selectable tags — use Chip.

Composition ​

Next to a tab or list label:

html
<span>
  Inbox
  <catnip-counter .value="3" appearance="primary" size="s"></catnip-counter>
</span>

Appearances ​

AppearanceTypical use
primaryBrand-accented counts (default)
secondaryNeutral counts on light or coloured surfaces

The disabled property composes with both appearances. Disabled Primary uses the disabled surface token; disabled Secondary retains its neutral surface. Both use disabled content colour. Counter itself remains presentational and non-interactive.

Sizes ​

SizeHeightTypical use
s18pxDense lists and tabs
m20pxDefault inline counts
l24pxEmphasized or larger type contexts

Catnip Design System by Signicat