IconTile
icon-tilePuts an icon in a small tinted square, placed to the left of feature or notification text.
Usage
Basic usage
The leftmost cell of "icon + text" rows in feature lists and feeds, with a subtle accent background by default; the icon is sized for you.
MCP server
One command and your assistant looks up props instead of guessing props.
<IconTile><Plug /></IconTile>
<div>
<Text weight="semibold">MCP server</Text>
<Text size="sm" tone="muted">One command and your assistant looks up props instead of guessing props.</Text>
</div>Variants × tones
soft has a subtle background, solid is filled, and outline is a neutral border that tints only the icon; the six tones match Tag and Button.
<IconTile tone="success" variant="soft"><Bell /></IconTile>
<IconTile tone="success" variant="solid"><Bell /></IconTile>
<IconTile tone="success" variant="outline"><Bell /></IconTile>Size
sm 32px / md 36px / lg 40px; the corner radius and icon size follow.
<IconTile size="sm"><ShieldCheck /></IconTile>
<IconTile size="md"><ShieldCheck /></IconTile>
<IconTile size="lg"><ShieldCheck /></IconTile>Category colours
color takes a semantic name or any CSS color and overrides tone, for coloring a feed by event type.
<IconTile variant="solid" color="chart-1"><ShoppingBag /></IconTile>
<IconTile variant="solid" color="chart-4"><MessageCircle /></IconTile>
<IconTile variant="solid" color="chart-5"><Rocket /></IconTile>When to use
The leftmost cell of "icon + text" rows in feature lists, notification feeds, product-line cards, and settings items. Three sizes, three variants, six semantic tones, and any category color. For a bare icon, use the icon directly; for people or accounts use Avatar; for a brand badge use Brand.
Import
import { IconTile } from "@hulianui/ui"Props
| Name | Type | Default | Description |
|---|---|---|---|
| tone | "brand" | "neutral" | "info" | "success" | "warning" | "danger" | "brand" | Semantic tone, matching Tag and Button |
| variant | "soft" | "solid" | "outline" | "soft" | soft is a subtle tinted background with a tinted icon; solid is a filled background with a foreground icon; outline is a neutral bordered surface where only the icon is tinted |
| size | "sm" | "md" | "lg" | "md" | 32 / 36 / 40px; the corner radius and icon size follow |
| color | string | - | Category color: a semantic name (chart-3 …), any CSS color, or var(--color-*). Overrides tone; all three variants derive from it |
Extends native<span>attributes.aria-hiddenby default (text next to it always explains it); passrole="img"andaria-labelwhen it has to stand on its own.
Slots
| Slot | Type | Description |
|---|---|---|
| children | ReactNode | The icon (lucide or another SVG); the component sizes it for each step |
Pitfalls
- The component sizes the icon for each step (
[&>svg]); don't addsize-*classes to the icon, or the steps won't line up. aria-hiddenby default: it's decoration and the text next to it carries the meaning. Passrole="img"andaria-labelonly when it appears alone and screen readers need to announce it.
Related
Playground
<IconTile variant="soft" tone="brand" size="md">
<Bell />
</IconTile>