Pill
A small label used to display metadata, status, or tags.
@volvo-cars/css v2.5.1
Pills are non-interactive metadata, status, or tag labels; they do not replace links or buttons.
Show code
<div class="flex gap-8"> <span class="pill-filled">Filled</span> <span class="pill-outlined">Outlined</span> <span class="pill-soft">Soft</span></div>Variants
Section titled “Variants”Filled
Section titled “Filled”The filled variant provides strong contrast, making it ideal for active states or important signifiers.
Outlined
Section titled “Outlined”The outlined variant has less visual weight, suitable for passive information or secondary indicators.
The soft variant uses a subtle background, perfect for metadata or tags that aren’t crucial to understanding the current context.
CSS Classes
Section titled “CSS Classes”| Class | Description |
|---|---|
pill-filled | Neutral surface background with inverted text color |
pill-outlined | Border-based styling with primary ornament color |
pill-soft | Secondary background for subtle appearance |
Accessibility
Section titled “Accessibility”- Ensure sufficient color contrast between the pill text and background
- Screen readers will read the pill content as plain text
- Do not rely on pill color alone to convey meaning. Include descriptive text
- Keep navigation and actions independent from the pill; the pill communicates information and is not interactive