Chip
A chip is a compact component used to represent information or selected choices.
Overview
The purpose of chips is to provide a visual representation of a specific entity or attribute, such as a selected option or a labelled category. Chips can also be interactive, allowing users to remove or modify the selected choices.
Chips are commonly used in various contexts, including filtering options, search results or any situation where concise and visually distinct information needs to be displayed.
Dos and Don’ts
Anatomy
- Icon (Optional): Non-interactive icon that can be used to visually support the string.
- String: Text label informing the user of the option/selection.
- Close (optional): Allows the Chip to be dismissible, but the application should provide a way for them to easily add it back.
Variations
Default
Outline
Ghost
Modifiers
Icon
Icons are always placed in a leading position.
Tick icon
Tick icon can be added for clarity and decision support when using chips to filter or multi-select to the selected state.
Close icon
Close icon can be added to the selected state to allow users to remove the selection or filter.
Size
Chips have a minimum width of 48px.
Content
- Keep the strings short so they are easy to read and scan.
- Use sentence case.
Layout
If there is a Chip grouping, by default they are laid out horizontally and stack if required. A spacing of 8px is used horizontally, and 12px for vertical stacking.
Usage
Input
Input chips usually represent an entity or different attributes. They can be added or removed within input fields.
Choice
Choice chips allow users to select one or more chips from a set of options (minimum of 2).
Filter
Filter chips allow users to refine content by selecting one or more chips from a set.
Action
Action chips trigger actions related to primary content.
Interactions
The whole chip is interactive, except when the close icon appears, in which case only the close icon is clickable to perform the action.
Interactive states
Outlines the atomic level interactive elements for the component.
Examples
Outlines the atomic level interactive elements for the component.
LTR examples
Here are some examples of chips in a left-to-right context:
RTL examples
Here are some examples of chips in a right-to-left context:
Resources
Stable | |
Stable | |
Beta | |
Vue [Fozzie] | N/A |
Stable | |
iOS JustUI [UI Kit] | Stable |
iOS PIE [SwiftUI] | Planned |
Android PIE [Compose & Views] | Stable |