Skip to content

Pill

Edit on GitHub

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.

Filled Outlined Soft
Show codeHide 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>

The filled variant provides strong contrast, making it ideal for active states or important signifiers.

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.

ClassDescription
pill-filledNeutral surface background with inverted text color
pill-outlinedBorder-based styling with primary ornament color
pill-softSecondary background for subtle appearance
  • 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