Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request.
Tags should always include a label. These can represent search terms, filters, or keywords.
Tags have the option to include an avatar in addition to the label. These should be used to represent entities.
Tags have the option to be removable or not. Removable tags have a small close (“x”) button.
A tag can be marked as having an error to show that it has become invalid.
A tag in a disabled state shows that a tag exists, but is not available in that circumstance. This can be used to maintain layout continuity and communicate that a tag may become available later.
Tags have a read-only option for when content in the disabled state still needs to be shown. This allows for content to be copied, but not interacted with or changed.
From the design point of view, each component has a number of options. These options and their names are platform agnostic, and each implementation should adapt these to fit into their framework.
Property | Values | Default value |
---|---|---|
label | text | – |
has avatar | yes / no | no |
is removable | yes / no | no |
is error | yes / no | no |
is disabled | yes / no | no |
is read-only | yes / no | no |
When the tag text is too long for the available horizontal space, it truncates. The full text should be revealed with a tooltip on hover.
When horizontal space is limited in a tag group, the individual tags wrap to form another line.
In some instances, it's possible to add an action next to a group of tags to provide a way to easily take an action on the entire group at once. Make sure to reveal the action only when there is more than one tag displayed.
In cases where users cannot interact with a large group of tags, consider hiding the group and its greater construct rather than disabling all of the individual tags.
For RTL (right-to-left) languages, the layout of the tag is mirrored. The avatar is right-aligned and the close button is left-aligned.
Key | Interaction |
---|---|
Tab | Tabbing into a group of tags places the focus on the first tag (only one tag receives the keyboard focus at a time). |
Left, Right, Up, Down Arrows | Moves focus through the group of tags. |
Page Up or Page Down | Moves focus to the previous or next tag in the group (last becomes first, and first becomes last). |
Home or End | Moves focus to the first or last tag in the group. |
Backspace, Delete, or Space | Removes the tag in focus from the group. |
Date | Number | Notes |
---|---|---|
Feb 24, 2023 | 8.0.0 |
|
Apr 06, 2022 | 7.0.0 |
|
Feb 26, 2020 | 6.1.0 |
|
Sep 11, 2019 | 6.0.0 |
|
Aug 22, 2019 | 5.1.0 |
|
Apr 20, 2019 | 5.0.0 |
|
Includes all interactive states that are applicable (hover, down, focus, keyboard focus, disabled).
Works properly across all four color themes (lightest, light, dark, darkest).
Includes a desktop scale (UWP, macOS, web desktop) and a mobile scale (iOS, Android, web mobile).
Color is not used as the only visual means of conveying information (WCAG 2.0 1.4.1).
Text has a contrast ratio of at least 4.5:1 for small text and at least 3:1 for large text (WCAG 2.0 1.4.3).
Visual information required to identify components and states (except inactive components) has a contrast ratio of at least 3:1 (WCAG 2.1 1.4.11).
UI language and information design considerations have been incorporated into component design.
Includes relevant options (variant, style, size, orientation, optional iconography, decorations, selection, error state, etc.)
Includes guidelines for keyboard focus, layout (wrapping, truncation, overflow), animation, interactions, etc.
Includes a list of dos and don'ts that highlight best practices and common mistakes.
Includes content standards or usage guidelines for how to write or format in-product content for the component.
Works properly across various locales and includes guidelines for bi-directionality (RTL).
Follows WCAG 2.0 standards for keyboard accessibility guidelines and includes a description of the keyboard interactions.
All design attributes (color, typography, layout, animation, etc.) are available as design tokens.
Includes a downloadable XD file that shows multiple options, states, color themes, and platform scales.
Includes a downloadable XD file, generated by code using design tokens defined in Spectrum DNA, and shows multiple options, states, color themes, and platform scales.
Component is included in the Spectrum for Adobe XD plugin.