Icon Tiles represent objects and resources unrelated or directly related to a product.
When to use
To represent an object or as part of a page title.
When not to use
Within a paragraph where an object is referred to.
Use Neutral if the object or page is not a specific product feature but something universal. For example, for a “Dashboard” or “User” page.
Use a product-specific color for objects or pages directly related to a product. For example:
- For a page showing a “Consul cluster”
- In a card or table row that represents a “Consul cluster”
Medium is the default size, but we recommend using the size that best fits the supporting text or UI. For example, don’t use large Icon Tiles in tables.
A secondary icon can be added to provide additional context. For example, for an “Add user” page the “plus” icon indicates the action.
Using with content
Icon Tiles should not appear without accompanying content. Instead, they should be presented alongside a text label for the object or page they are being used to represent. We recommend thinking of them as an accessory.
How to use this component
The default invocation requires an
@icon argument or a
@logo argument. If providing an
@icon argument, it renders a medium neutral Icon Tile. If providing a
@logo argument, it renders the logo in the relevant brand styles.
<Hds::IconTile @icon="user" />
<Hds::IconTile @logo="vault" />
A different color Icon Tile can be invoked using the
<Hds::IconTile @color="waypoint" @icon="user" />
A different size Icon Tile can be invoked using the
<Hds::IconTile @logo="boundary" @size="small" />
<Hds::IconTile @logo="packer" @size="large" />
To add a secondary icon, use the
@iconSecondary argument with any icon as the value.
<Hds::IconTile @icon="user" @iconSecondary="plus" />
- medium (default)
- neutral (default)
@colorparameter is overwritten if a
@logoparameter is passed, in which case the product “brand“ color is used.
When used as recommended, there should not be any accessibility issues with this component.
Accounting for screen readers
Because Icon Tiles are purely decorative, they’re hidden from screen readers by default.
Applicable WCAG Success Criteria
This section is for reference only. This component intends to conform to the following WCAG Success Criteria:
Non-text Contrast (Level AA):
The visual presentation of the following have a contrast ratio of at least 3:1 against adjacent color(s): user interface components; graphical objects.
If any accessibility issues have been found within this component, let us know by submitting an issue.