Chip

Compact inputs, attributes or actions.

When to use

Use a chip for an attribute, selected filter, removable input or compact action. Tags and pills are contextual names; use a Badge for a passive count or status.

Default

Accessibility
HTML
<span class="chip">Accessibility</span>

Solid

PrimarySecondarySuccessWarningError
HTML
<span class="chip chip-primary chip-solid">
	<span class="chip-label">Primary</span>
</span>

Outline

Primary outline
HTML
<span class="chip chip-primary chip-outline">
	<span class="chip-label">Primary outline</span>
</span>

Text

Primary text
HTML
<span class="chip chip-primary chip-text">
	<span class="chip-label">Primary text</span>
</span>

Interactive

Use native links or buttons for interactive chips. Reserve .chip-interactive for custom controls with equivalent keyboard behavior.

HTML
<button class="chip chip-primary chip-outline" type="button">
	<span class="chip-label">Filter by accessibility</span>
</button>

Deletable

Accessibility
HTML
<span class="chip chip-primary chip-solid">
	<span class="chip-label">Accessibility</span>
	<button class="chip-action" type="button" aria-label="Remove Accessibility filter">
		<Icon size="sm" aria-hidden="true">
			<CircleXmarkSolidIcon />
		</Icon>
	</button>
</span>

Disabled

Accessibility
HTML
<div class="chip chip-primary chip-solid disabled">
	<span class="chip-label">Accessibility</span>
</div>

Accessibility and behavior

  • Choose native links for navigation and buttons for commands. A styled span remains passive; interactive classes alone do not add keyboard behavior.
  • Name remove buttons with the affected value, such as Remove Accessibility filter. After removal, move focus to an appropriate remaining control.
  • For toggle buttons, synchronize aria-pressed with the application state. Use native disabled on unavailable buttons; visual disabled classes do not prevent activation.

CSS variables

--action-color* styles interactive primary text and outlines; theme tokens style passive and solid chips.

Override these base defaults on the listed selector after the library styles. Variants and states may replace them; global tokens follow the active theme.

TokenDefaultPurposeScope / state
--chip-colorvar(--primary)Text and border color for outline and text variants..chip-outline / .chip-text
--chip-color-hovervar(--primary-hover)Text color on hover for interactive text chips..chip-outline / .chip-text
--chip-color-activevar(--primary-active)Text color on pressed or active text chips..chip-outline / .chip-text
--chip-on-colorvar(--on-primary)Text and icon color on filled surfaces..chip-solid / .chip-outline
--chip-surface-colorvar(--chip-color)Background and border color for solid chips..chip-solid / .chip-outline
--chip-surface-color-hovervar(--chip-color-hover)Filled background and border color on hover..chip-solid / .chip-outline
--chip-surface-color-activevar(--chip-color-active)Filled background and border color when pressed or marked active..chip-solid / .chip-outline
--chip-font-sizevar(--font-size-sm)Text size..chip
--chip-padding-yvar(--spacer-0)Top and bottom padding..chip
--chip-padding-xvar(--spacer-2)Left and right padding..chip
--chip-border-radius9999pxCorner radius..chip
--chip-border-widthvar(--border-width)Border thickness..chip
--chip-action-size1.5remWidth and height of the trailing action..chip
--chip-highlightvar(--bg-highlight)Hover and active background of interactive text chips..chip: interactive hover / .chip-text active
--chip-disabled-text-colorvar(--disabled-text-color)Text color while disabled..chip (disabled)
--chip-disabled-bg-colorvar(--disabled-bg-color)Background color while disabled..chip (disabled)
--chip-disabled-border-colorvar(--disabled-border-color)Border color while disabled..chip (disabled)
--chip-transition-durationvar(--transition-duration)Duration of visual state transitions..chip
--chip-transition-easingvar(--transition-easing)Timing curve for visual state transitions..chip