Icon Tile

A tinted square holding an icon, saying what kind of thing a row or panel is. It's decorative: the text beside it names the thing. Tones come from the status palette, with the icon in the tone's text colour.

BetaReady to use. Its API can still change in a minor release; the changelog says when.

import { IconTile } from "@leap-crm/design-system";

Playground

Change a prop and the component follows. Its code is under Props.

Props

size
icon
tone

Best practices

When to use it, and the rules that apply in particular places.

GuidancePractice
DoUse size 40 in a panel header, 32 in a workspace row and 28 in a dense list, so the tile stays in proportion with the text beside it.
DoName the thing in text beside the tile, like "Matter details". The tile is hidden from screen readers.
DoKeep one tone for one kind of thing across the CRM, so a lawyer learns that a colour means, say, a document.
Don'tUse a tile's tone as the only sign of a status, like overdue. Colour alone says nothing to some readers; use Badge with the word.
Don'tMake a tile clickable. It has no name or focus state; use an IconButton, which needs an aria-label.

Props

PropTypeDefaultDescription
icon *ReactNode—The icon, drawn in the tone's text colour at 14, 16 or 20 px.
toneExclude<Tone, "default" | "plum"> | "neutral""info"The tile's colour: one of the status tones, or neutral.
size28 | 32 | 403240 for panel headers, 32 in workspace rows, 28 in dense lists.
classNamestring—Classes added to the root element, merged with its own. Tokens only.

Code

What the playground shows, ready to copy.

import { IconTile, PlusIcon } from "@leap-crm/design-system";

<IconTile icon={<PlusIcon />} />