Data Display

Chip

Compact pill for short tags, applied filters, and selected entities, with optional removal or toggle interactions via its mode prop.

import { Chip } from '@lostgradient/cinder';
tagfilter
01

Overview

Reference usage

Compact token for issue labels, free-form tags, applied filters, selected entities, and removable or toggleable choices.

Use Chip mode="display" for issue labels and short tags only. Use Badge for attached counts, statuses, and compact annotations. Label and value metadata for a record (an owner, a created date, a price) is not a row of chips: put it in a DescriptionList, or a KeyFacts row for a few typed facts, so the labels line up and the values read as text.

Usage

svelte
<script lang="ts">
  import { Chip } from '@lostgradient/cinder';
</script>

<Chip label="frontend" mode="display" variant="info" />

Filled, and a selection that reads louder

A chip is filled and never outlined: an unselected chip is a tone step on its surface with no edge. A selected toggle chip (pressed) is louder than an unselected one and never a solid accent fill: it takes the accent tint, the accent label, a 1.5px accent ring inside its edge and a check glyph before its label, so the selection is not carried by colour alone. A toggle chip is a control, so it is at least --cinder-control-height-xs tall and a coarse pointer lifts it to the 44px touch target; a display chip is a label and keeps its compact height.

Suggested chips

suggested marks a chip the product drafted that is not saved until the person confirms it, such as a suggested context on a drafted next action. On a neutral chip the label reads in the accent text colour, and assistive technology hears "Suggested" before the label. A small sparkle glyph before the label gives a sighted person a cue that is not colour alone (WCAG 1.4.1), on every variant. The chip gains no tint, border or second pill; a status variant keeps its tone and the spoken word.

svelte
<script lang="ts">
  import { Chip } from '@lostgradient/cinder';
</script>

<Chip label="@phone" suggested />
Live preview

Chip disabled states

Disabled removable

02

When to use

Use when
  • Representing issue labels, free-form tags, applied filters, or selected entities.
  • Offering a small toggleable option inside a group of choices.
Avoid when
  • Showing a numeric count, short status, or compact category annotation next to another element — use badge instead.
  • Picking one of a small fixed set — use segmented-control instead.
  • Showing label and value metadata for a record, such as an owner, a date or a price — use description-list instead.
03

Examples

Chip disabled states

Disabled toggle and disabled removable chip.

Metadata tags

Display-mode chips used as issue labels and free-form metadata tags.

Chip modes

Display, toggle, and removable chip modes.

Chip variants

All six semantic variant styles in display mode.