Tag
Overview
Tags represent filters, or items related to the organisation of content being displayed.
Live demo
Usage
Do
Use Tags to highlight selected items, providing a visually distinctive representation.
Ensure Tag content is concise, clear, and relevant to convey the associated label or category.
Integrate Icons when applicable to enhance visual representation and understanding.
For indicating status, use a Badge instead.
If users can only select one option from a list, opt for Radio Buttons instead of Tags to convey a singular selection more clearly.
Don't
Don't use inconsistent sizing for Tags.
Ensure consistent click or tap behaviour across Tag; avoid implementing different interactions for similar components.
Avoid vague or unclear Tags labels; ensure they provide meaningful information without requiring additional context.
Placement
Tags are usually positioned near a Select Field, to indicate selected filters.
Sizes
There are 2 Tag sizes available.
| Example | Size |
|---|---|
Label | Medium |
Label | Small |
States and interactions
| Example | State | When to use |
|---|---|---|
Label | Enabled | The default state is the base appearance, displaying a filterd selection. |
Label | Hover | Applied when the user hovers over the tag to indicate interactivity. |
Label | Disabled | Use the disabled state to visually indicate that the tag cannot be interacted with. |
Label | Active | Used to communicate that the tag is active. |
Label | Focus | Use to ensuring a clear and visible indicator for keyboard users |
Label | With icon | Use with icon that indicates the close action, that this filter can be removed. |
Accessibility
To ensure that the Tag component is accessible to all users, follow these best practices:
Use descriptive and concise text in the Tag component.
Use contrasting colours to ensure the Tag's content is easy to read.
Ensure the Tag is keyboard accessible.
Use the ARIA role attribute to help screen readers identify the Tag’s purpose.
iOS guidance
Along with the guidance above, there is some iOS specific guidance for this component.
Optimise the sizing of Tags to be touch-friendly, ensuring they are easily tappable on iOS devices for a smooth user experience.
Prioritise iOS-specific accessibility features, such as VoiceOver compatibility and clear focus indicators, to enhance the usability of Tags for users with diverse needs.