Content
Pill
Non-interactive label for status, tags and categories.
- Ready
- No keyboard interaction
- Screen reader not tested yet
Playground
Change the props and the surface. The controls come from the documented props; the surfaces are the real modes.
UX research
<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 usedDon’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.
- containerFully rounded, 1px border, no fill.
- 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.
| Name | Type | Default | Description |
|---|---|---|---|
| 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. |
| dashed | boolean | false | Dashed 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.
| Token | Tier | Value | Utility |
|---|---|---|---|
| pill.accentOutline.border | component | #C6492E | |
| pill.accentOutline.fg | component | #C6492E | |
| pill.fontSize | component | 13px | |
| pill.neutral.border | component | rgba(10,10,11,0.08) | |
| pill.neutral.fg | component | #0A0A0B | |
| pill.paddingX | component | 12px | |
| pill.paddingY | component | 4px | |
| pill.radius | component | 9999px | |
| spacing.1 | semantic | 4px | |
| status.caution.bg | semantic | #F4EEDF | |
| status.caution.fg | semantic | #7A5D14 | |
| status.danger.bg | semantic | #FBF0EE | |
| status.danger.fg | semantic | #B4342A | |
| status.info.bg | semantic | #EAF2F4 | |
| status.info.fg | semantic | #12566E | |
| status.positive.bg | semantic | #D6E7DE | |
| status.positive.fg | semantic | #0F6A4E | |
| weight.medium | semantic | 500 |
Accessibility
What is checked automatically on every build, and what a person has tested. Nothing is marked as tested unless it was.
| Check | How | Status |
|---|---|---|
| axe-core rules | Automated on every npm run check, at desktop and mobile width | Runs on every build |
| Keyboard | Automated Playwright test (scripts/keyboard.mjs) | Not applicable |
| Screen reader | Manual | Not 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
| Pairing | Ratio (x:1) | Minimum | Status |
|---|---|---|---|
| status.positive.fg on status.positive.bg | 5.12 | 4.5 | Pass |
| status.caution.fg on status.caution.bg | 5.33 | 4.5 | Pass |
| status.info.fg on status.info.bg | 7.17 | 4.5 | Pass |
| status.danger.fg on status.danger.bg | 5.43 | 4.5 | Pass |
| text.primary on status.danger.bg | 17.72 | 4.5 | Pass |
| text.primary on status.info.bg | 17.44 | 4.5 | Pass |
| text.primary on status.caution.bg | 17.10 | 4.5 | Pass |
| text.primary on status.positive.bg | 15.40 | 4.5 | Pass |