Chip

Also known as: Pill, Token, Lozenge

Resources

Properties

PropertyValuesDefault
Size VariantSm | MdMd
Selected Booleantrue | falsefalse
State VariantDefault | Hover | Focus | DisabledDefault
Has start item Booleantrue | falsetrue
Start item InstanceSwapAny iconheart
Label TextstringLabel
Has end item Booleantrue | falsetrue
End item InstanceSwapAny iconclose

When to use

When users need to select or deselect multiple options, such as product filters or multi-select forms.
When wanting to provide compact actions for the users, such as adding/removing items or mentions.

If users needs to perform an action with confirmation, use button instead.
If the labels are static and simply serve as descriptors or categories, use tag instead.
If the list of choices is too long, consider using a select instead.

Size

Dimensions of the chip are tied to the global scale tokens. This ensures that the components, especially forms, with similar size settings remain consistent across the interface. scale tokens also provides more granular control over dimensional settings.

scale.css
--scale-width-<size>
--scale-height-<size>
--scale-padding-<size>
--scale-gap-<size>
--scale-radius-<size>
--scale-icon-size-<size>
--scale-text-size-<size>
--scale-text-height-<size>

Variants

Some common variants are already created and ready to use (see the table), but you have the possibility to add new variants or customize every visual aspect through tokens and token modes.

VariantWhen to use
FillFill variant emphasizes visibility and interaction priority. Visually, it has high contrast compared to its surroundings.
OutlineOutline variant blends more with the surroundings, but is separated from the background with a border.

Behaviour

Selection

Chip has two selection states:

  • Usually, unchecked chips are used as default, in case if user should manually select relevant filters or options.
  • Depending on the context, checked chips are used as default in scenarios, where commonly or previously used filters are pre-selected.

States

Chip (and all other forms and selection controls) express states. States indicate current condition of the component to someone interacting with it. Using states ensure clear user feedback, highlighting possible actions or barriers. We have included most common states:

StateContext
DefaultStatus of the component before the interaction. Also referred to as ‘resting’.
HoverWhen the user moves their cursor over the component, but is not taking the action. Slight visual change can indicate interactivity of the component.
FocusWhen user selects the component via keyboard navigation, but has not yet taken action on it.
DisabledA non-interactive state where the component appears faded or grayed out. It indicates that the action is unavailable at the moment.