Components · Identity
IconTile
A neutral square with an icon, sized like an avatar, for a place or a thing without a face — a channel, a system notice, a file, an app, a computer.
Also called ChannelIcon, channel tile
import { IconTile } from "@botiverse/raft-ui";IconTile is a neutral square holding one icon. A channel is a place, not someone, so in lists it is a neutral # tile rather than an avatar; anything else without an identity (a system notice, a file, an app, a computer, a kind of search result) uses the same tile with its own icon. The tile takes the avatar sizes, so it sits where an avatar would.
When to use
Anatomy
IconTile: the square. It holds one icon, Lucide's or one of Raft's own from@botiverse/riconssuch asThreadIcon(Icons), and sizes the icon to fit (Iconography).
Variants
Accessibility
IconTile renders a <span> and wraps no Base UI primitive.
- The tile is decorative beside its words, so it is hidden from assistive technology by default.
- Give a tile that means something on its own (such as the kind of a channel, with no words next to it)
role="img"and anaria-label; it is then announced.
Rules
- Don't give a channel a color: a channel is a place, not an identity.
- Show at most one yellow location tile per screen, beside the title of the place the person is in. In a list, the current item is the selected row, not a yellow tile (States).
- Use
warningandinformationonly for system notices. Everywhere else the tile is neutral. - Put the tile where an avatar would go in the same row, at the same size, so tiles and avatars line up in one column. It takes its corner by its size (27
radius-chip, 35radius-control, 51radius-container), as the controls do; an avatar stays aradius-stickersticker at every size (Shape).
API
IconTile
A neutral square holding an icon, sized like an avatar: 19, 27, 35 or 51. It is decorative beside its words, so it is hidden from assistive tech; a tile that means something on its own takes `role="img"` and an `aria-label`, and is announced.
Also takes the attributes of its element.
Related
Changes
- 0.6.1 · Added
IconTile, the neutral tile (rf-tile) for things with no face, on the avatar size ladder (19 / 27 / 35 / 51), withwarningandinformationnotice washes;aria-hiddenunless given a role.