Illustration
A line drawing that gives an empty state, a first run or an announcement something to look at.
import { Illustration } from '@/components/ui/wideset/illustration/Illustration';
<Illustration illustration="computer" />Installation
pnpm dlx wideset add illustration
Copies the component and any Wideset components it uses into your project.
Examples
Illustrations
Three drawings, each for one kind of moment: a calendar for nothing scheduled yet, a folder for nothing stored yet, a computer for something new to try. Pick the one that names what is missing; when none does, leave the drawing out.
import { Illustration } from '@/components/ui/wideset/illustration/Illustration';
export default function IllustrationIllustrations() {
return (
<div className="gap-ws-12 flex flex-wrap items-center justify-center">
<Illustration illustration="calendar" size="sm" />
<Illustration illustration="folder" size="sm" />
<Illustration illustration="computer" size="sm" />
</div>
);
}Sizes
lg (240px) fills an empty page or a first-run screen; sm (140px) sits in a card, a panel or an announcement. Each size is drawn on its own, so the lines keep the same weight at both.
import { Illustration } from '@/components/ui/wideset/illustration/Illustration';
export default function IllustrationSizes() {
return (
<div className="gap-ws-12 flex flex-wrap items-end justify-center">
<Illustration illustration="folder" size="lg" />
<Illustration illustration="folder" size="sm" />
</div>
);
}Empty state
An empty state: the drawing, a short heading, one sentence on what appears here and one action, centred in the region that is empty. The text carries the meaning, so the drawing stays decorative.
import { RiUpload2Line } from '@remixicon/react';
import { Button } from '@/components/ui/wideset/button/Button';
import { Illustration } from '@/components/ui/wideset/illustration/Illustration';
export default function IllustrationEmptyState() {
return (
<div className="gap-ws-9 flex w-[24rem] max-w-full flex-col items-center text-center">
<Illustration illustration="folder" size="sm" />
<div className="gap-ws-3 flex flex-col">
<h2 className="typography-subtitle-xs text-ws-static-strong">No files yet</h2>
<p className="typography-body-md text-ws-static-subtle">
Files you upload to this project appear here, newest first.
</p>
</div>
<Button>
<Button.Icon icon={RiUpload2Line} />
Upload a file
</Button>
</div>
);
}API reference
| Name | Description | Default |
|---|---|---|
illustration* | Which drawing to show. IllustrationName | — |
size | `lg` (240px) for an empty page or a first-run screen, `sm` (140px) inside a card, a panel or an announcement. Each size is drawn separately, so lines keep their weight; do not scale one into the other with CSS. IllustrationSize | 'lg' |
title | Accessible name, for an illustration that says something the text beside it does not. Left out (and with no `aria-label` or `aria-labelledby`), the illustration is decorative and hidden from screen readers, which is the usual case. string | — |
Accessibility
- Decorative by default:
aria-hidden, so a screen reader reads only the text beside it. - With
titleit becomesrole="img"named by its title; anaria-labelnames it the same way.
import { Illustration } from '@/components/ui/wideset/illustration/Illustration';
<Illustration illustration="computer" />