Skip to content

Content

Pill

Non-interactive label for status, tags and categories.

  • Ready
  • No keyboard interaction
  • Screen reader not tested yet

Updated 2026-11-12

Playground

Change the props and the surface. The controls come from the documented props; the surfaces are the real modes.
UX research
tsx
<Pill>UX research</Pill>

Usage

When to use

Use a pill for a short label attached to something: a tag, a category, a state such as “Live” or “Blocked”.

When not to use

  • As a button or a filter: pills are not clickable. Use FilterChips for filters.
  • For a state in many table rows: StatusDot is quieter.

How it works

neutral for tags, accent-outline for rare emphasis, and positive, caution, info and danger for states. dashed marks an assumption or an unconfirmed value, the same way dashed lines mark inferred claims elsewhere in free•lenz.

Content guidelines

One or two words. For states, the word carries the meaning (“Blocked”, not only a red pill).

Do and don’t

  • ActiveEstimate
    DoOne or two words; dashed where the value is an assumption.
    This account is active and can be used
    Don’tA sentence in a pill: it wraps, and the shape stops reading as a status.
Do
  • Keep it to one or two words.
  • Use dashed for assumptions and unconfirmed values.
Don’t
  • Don't use it as a button; pills are not clickable.
  • Don't rely on the status colour alone; the word must say the state.

Anatomy

The parts of the component and what each one does, as in the playground above.
  1. containerFully rounded, 1px border, no fill.
  2. labelOnest medium, one line.

Examples

Type-checked, and the same code goes into the AI manifest. Import: import { Pill } from "@/ds";

neutral

UX research

accent-outline

Featured

Status

LivePendingIn reviewBlocked

Dashed

Assumption

Props

Checked against the component's TypeScript type on every build.
Pill props
NameTypeDefaultDescription
variant"neutral" | "accent-outline" | "positive" | "caution" | "info" | "danger""neutral"accent-outline only for emphasis; the status variants for states, with a word that names the state.
dashedbooleanfalseDashed outline for assumptions and unconfirmed values.
children (required)ReactNode–One or two words.

Tokens used

Derived from the utility classes in the component's source. Copy a class with one click.
Tokens used by Pill
TokenTierValueUtility
pill.accentOutline.bordercomponent#C6492E
pill.accentOutline.fgcomponent#C6492E
pill.fontSizecomponent13px
pill.neutral.bordercomponentrgba(10,10,11,0.08)
pill.neutral.fgcomponent#0A0A0B
pill.paddingXcomponent12px
pill.paddingYcomponent4px
pill.radiuscomponent9999px
spacing.1semantic4px
status.caution.bgsemantic#F4EEDF
status.caution.fgsemantic#7A5D14
status.danger.bgsemantic#FBF0EE
status.danger.fgsemantic#B4342A
status.info.bgsemantic#EAF2F4
status.info.fgsemantic#12566E
status.positive.bgsemantic#D6E7DE
status.positive.fgsemantic#0F6A4E
weight.mediumsemantic500

Accessibility

What is checked automatically on every build, and what a person has tested. Nothing is marked as tested unless it was.
Testing status by check
CheckHowStatus
axe-core rulesAutomated on every npm run check, at desktop and mobile widthRuns on every build
KeyboardAutomated Playwright test (scripts/keyboard.mjs)Not applicable
Screen readerManualNot tested yet

Semantics and focus

  • The text carries the information; the border is decorative.
  • Contrast: text.primary or accent.default on surface.page/card, both in the gate.

Contrast

Pill contrast pairings
PairingRatio (x:1)MinimumStatus
status.positive.fg on status.positive.bg5.124.5Pass
status.caution.fg on status.caution.bg5.334.5Pass
status.info.fg on status.info.bg7.174.5Pass
status.danger.fg on status.danger.bg5.434.5Pass
text.primary on status.danger.bg17.724.5Pass
text.primary on status.info.bg17.444.5Pass
text.primary on status.caution.bg17.104.5Pass
text.primary on status.positive.bg15.404.5Pass