Tile
Tile groups related information in a bordered container.
import { RiRocketLine } from '@remixicon/react';
import { Tile } from '@/components/ui/wideset/tile/Tile';
<Tile.Checkbox
title="Pro"
description="Unlimited projects"
icon={RiRocketLine}
defaultChecked
>
<Tile.Indicator />
</Tile.Checkbox>Installation
pnpm dlx wideset add tile
Copies the component and any Wideset components it uses into your project.
Examples
Kinds
Pick the kind by what the tile is, not by how it looks. Tile is static text with no role and no tab stop. Tile.Checkbox is one checkbox per tile, each its own tab stop, toggled with Space. Tile.Radio inside Tile.RadioGroup is a single choice: the group is one tab stop and the arrow keys move the selection. For a tile that runs an action or opens a link, use Action tile.
import { RiCloudLine, RiRocketLine, RiShieldCheckLine, RiTeamLine } from '@remixicon/react';
import { Tile } from '@/components/ui/wideset/tile/Tile';
export default function TileKinds() {
return (
<div className="gap-ws-9 grid w-full grid-cols-[repeat(auto-fit,minmax(15rem,1fr))] items-start">
<div className="gap-ws-5 flex flex-col">
<span className="typography-caption-md text-ws-static-subtle">Static</span>
<Tile icon={RiTeamLine} title="Team" description="8 members" />
</div>
<div className="gap-ws-5 flex flex-col">
<span className="typography-caption-md text-ws-static-subtle">Checkbox</span>
<Tile.Checkbox icon={RiCloudLine} title="Backups" description="Daily" defaultChecked>
<Tile.Indicator />
</Tile.Checkbox>
<Tile.Checkbox icon={RiShieldCheckLine} title="Audit log" description="Every change">
<Tile.Indicator />
</Tile.Checkbox>
</div>
<div className="gap-ws-5 flex flex-col">
<span className="typography-caption-md text-ws-static-subtle">Radio group</span>
<Tile.RadioGroup aria-label="Plan" defaultValue="pro">
<Tile.Radio value="starter" icon={RiCloudLine} title="Starter" description="3 projects">
<Tile.Indicator />
</Tile.Radio>
<Tile.Radio value="pro" icon={RiRocketLine} title="Pro" description="Unlimited">
<Tile.Indicator />
</Tile.Radio>
</Tile.RadioGroup>
</div>
</div>
);
}States
Hover, press and keyboard focus are live. The indicator only mirrors the tile's state: it is hidden from screen readers, which hear the tile's own checked state. A disabled tile is skipped by Tab and keeps its selection, so the user can still see what was chosen.
import { RiCloudLine } from '@remixicon/react';
import { Tile } from '@/components/ui/wideset/tile/Tile';
const states = [
{ label: 'Unselected', checked: false, disabled: false },
{ label: 'Selected', checked: true, disabled: false },
{ label: 'Disabled', checked: false, disabled: true },
{ label: 'Disabled, selected', checked: true, disabled: true },
];
export default function TileStates() {
return (
<div className="gap-x-ws-7 gap-y-ws-5 grid grid-cols-[7rem_minmax(0,18rem)] items-center">
{states.map((state) => (
<div key={state.label} className="contents">
<span className="typography-caption-md text-ws-static-subtle">{state.label}</span>
<Tile.Checkbox
icon={RiCloudLine}
title="Backups"
description="Daily, kept 30 days"
defaultChecked={state.checked}
disabled={state.disabled}
>
<Tile.Indicator />
</Tile.Checkbox>
</div>
))}
</div>
);
}API reference
Tile
| Name | Description | Default |
|---|---|---|
asChild | Renders the tile styling onto the child element via Radix Slot, for the rare case where you own the element (a `<li>`, a `<label>`, ...). boolean | — |
children | Content rendered inside the component. ReactNode | — |
className | Additional CSS classes merged with the rendered element. string | — |
description | The description text of the tile. string | — |
icon | Leading icon rendered beside the text column. RemixiconComponentType | — |
ref | Ref to the rendered element. Ref<HTMLDivElement> | — |
title | The title text of the tile. string | — |
<div> is passed through to it. See MDN: <div>.Tile.Checkbox
| Name | Description | Default |
|---|---|---|
children | Content rendered inside the component. ReactNode | — |
className | Additional CSS classes merged with the rendered element. string | — |
description | The description text of the tile. string | — |
icon | Leading icon rendered beside the text column. RemixiconComponentType | — |
title | The title text of the tile. string | — |
Radix Checkbox.Root is passed through to it. See Radix Checkbox.Root.Tile.RadioGroup
| Name | Description | Default |
|---|---|---|
className | Additional CSS classes merged with the rendered element. string | — |
label | Accessible name for the group, rendered as a `FieldLabel` and wired with `aria-labelledby`. Without it a screen reader announces only "radio group". An explicit `aria-label` / `aria-labelledby` takes precedence. ReactNode | — |
Radix RadioGroup.Root is passed through to it. See Radix RadioGroup.Root.Tile.Radio
| Name | Description | Default |
|---|---|---|
children | Content rendered inside the component. ReactNode | — |
className | Additional CSS classes merged with the rendered element. string | — |
description | The description text of the tile. string | — |
icon | Leading icon rendered beside the text column. RemixiconComponentType | — |
title | The title text of the tile. string | — |
Radix RadioGroup.Item is passed through to it. See Radix RadioGroup.Item.Accessibility
Tile.Checkboxis its own tab stop, toggled with Space.Tile.RadioGroupis one tab stop; the arrow keys move the selection.- Name the radio group with
label,aria-labeloraria-labelledby; without it a screen reader hears only “radio group”. - For a set of
Tile.Checkbox, wrap them in an element withrole="group"and a name.
| Part | Renders | Description |
|---|---|---|
| TileRenders no element | <div> | Static tile. Presentational only: no role, no tab stop, no selection state. Use `Tile.Checkbox` / `Tile.Radio` for selection and `ActionTile` for an action or a link. |
| Tile.CheckboxRenders no element | Radix Checkbox.Root | A selectable tile allowing independent selection. |
| Tile.RadioGroupRenders no element | Radix RadioGroup.Root | A group of mutually exclusive radio options. |
| Tile.RadioRenders no element | Radix RadioGroup.Item | A selectable tile belonging to a radio group. |
import { RiRocketLine } from '@remixicon/react';
import { Tile } from '@/components/ui/wideset/tile/Tile';
<Tile.Checkbox
title="Pro"
description="Unlimited projects"
icon={RiRocketLine}
defaultChecked
>
<Tile.Indicator />
</Tile.Checkbox>