Tangible Design System · @tangible/ui 0.2.46 · Interactive version · Markdown

IconTile

An icon in a tinted tile: a stat's category, an empty state, a step in a list. Avatar's sibling. Avatar is a person, drawn from their name; IconTile is a thing, coloured by meaning (a theme). They share one size ladder so they line up in the same list.

Decorative by default: the text beside it says what it means. Give it a label when it stands alone. Not interactive: wrap it in a Button to act.

import { IconTile } from '@tangible/ui';

Interactive docs and examples: IconTile in Storybook.

IconTile props

Prop Type Default Description
icon IconSource The icon, by registry name ("system/folder") or as an imported icon component
label? string Names the tile as an image. Leave it out when the text beside the tile already says what it means (the usual case): the tile is then decorative and hidden from assistive tech. Don't repeat text that's already beside it, or it's read twice. Blank or whitespace-only counts as no label.
shape? "circle" | "square" "square" Default square (radius-md)
size? "lg" | "md" | "sm" | "xl" | "xs" | "xxl" "md" Default md (40px). The same ladder as Avatar, so the two line up in a list.
theme? "danger" | "info" | "primary" | "secondary" | "success" | "warning" "primary" Default primary. Meaning, not identity: the tint and icon colour follow the theme.

Also accepts the standard attributes of HTMLAttributes (data-*, aria-*, event handlers), passed to the element it renders.

Examples

Component API tokens

Read via fallback, never declared. Set one on an ancestor to restyle every instance under it.