component
Illustration
One of Rost's 24 small drawings, 72px, in two greys and a green that follow the theme.
Activation & conversionAlignmentArtAudit & StrategyBest ideaBridging the gapsDesign partnerDesign systemDesign system leadershipEfficiencyGoal focusedImplementingInteractive showcaseLong term projectsMentoringPart of the teamProduct designRetentionScale teamShip bestSimplicity v ComplexityStructured systemTimezonesUIimport { Illustration } from 'rost/components/illustration/Illustration'
<Illustration name="structured-system" />
<Illustration name="timezones" label="Works across time zones" /> src/components/illustration/Illustration.tsx
import type { HTMLAttributes } from 'react'
import { DRAWINGS } from './drawings'
import './illustration.css'
export const ILLUSTRATION_NAMES = ['activation-and-conversion', 'alignment', 'art', 'audit-and-strategy', 'best-idea', 'bridging-the-gaps', 'design-partner', 'design-system', 'design-system-leadership', 'efficiency', 'goal-focused', 'implementing', 'interactive-showcase', 'long-term-projects', 'mentoring', 'part-of-the-team', 'product-design', 'retention', 'scale-team', 'ship-best', 'simplicity-v-complexity', 'structured-system', 'timezones', 'ui'] as const
export type IllustrationName = (typeof ILLUSTRATION_NAMES)[number]
export interface IllustrationProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
/** The file in `assets/illustrations/`, without `.svg`. */
readonly name: IllustrationName
/** What it stands for, when it carries meaning. Without it the drawing is hidden from screen readers. */
readonly label?: string
}
const b = 'rost-illustration'
/**
* A 72px drawing in two greys and a green, the illustration tokens, so it
* follows the theme. The SVG is inline (drawings.ts, from
* bin/build-illustrations.mjs). Built from contracts/illustration.contract.yaml.
*/
export function Illustration({ name, label, className, ...rest }: IllustrationProps) {
const a11y = label ? { role: 'img', 'aria-label': label } : { 'aria-hidden': true }
return <span className={[b, `${b}--name-${name}`, className].filter(Boolean).join(' ')} {...a11y} {...rest} dangerouslySetInnerHTML={{ __html: DRAWINGS[name] }} />
}
The source for everything on this page: contracts/illustration.contract.yaml (opens in a new tab). The CSS, the docs and the checks in each app are built from it.
# yaml-language-server: $schema=../schema/component-contract.schema.json
schemaVersion: 2
id: illustration
name: Illustration
kind: component
status: review
summary: One of Rost's 24 small drawings, 72px, in two greys and a green that follow the theme.
category: display
related: [ icon, thumbs ]
source:
tool: figma
fileKey: 1Zy0wiWKXQAvsfDBX3KR0d
nodeId: "41:570"
url: https://www.figma.com/design/1Zy0wiWKXQAvsfDBX3KR0d/UI-Kit-v01?node-id=41-570
extractedAt: "2026-10-30"
extractedBy: mcp
frozenAt: "2026-10-30"
props:
name:
type: enum
values: [ activation-and-conversion, alignment, art, audit-and-strategy, best-idea, bridging-the-gaps, design-partner, design-system, design-system-leadership, efficiency, goal-focused, implementing, interactive-showcase, long-term-projects, mentoring, part-of-the-team, product-design, retention, scale-team, ship-best, simplicity-v-complexity, structured-system, timezones, ui ]
default: alignment
notes: "The file in `assets/illustrations/`, without `.svg`. Figma's `type` names, in lower case with dashes: \"Audit & Strategy\" is `audit-and-strategy`."
label: { type: slot, notes: "What the drawing stands for, when it carries meaning. Without one it's hidden from screen readers." }
elements:
root:
notes: "A `<span>` holding the drawing, inline. Unlike an Icon it doesn't take the text colour: its three colours are its own tokens."
styles:
display: { value: inline-block, assert: false }
vertical-align: { value: middle, assert: false }
flex-shrink: { value: "0", assert: false }
width: { token: spacing/size/2xlarge, value: 72px }
height: { token: spacing/size/2xlarge, value: 72px }
drawing:
notes: "The SVG itself, from `assets/illustrations/`, made inline by `bin/build-illustrations.mjs` so its colours can follow the theme."
styles:
display: { value: block, assert: false }
width: { value: 100%, untokenised: "The drawing fills the 72px box." }
height: { value: 100%, untokenised: "The drawing fills the 72px box." }
shade:
notes: "The darkest shapes, a step off the page. Every drawing is made of these three colours and nothing else."
styles:
fill: { token: illustration/shade, value: "#232423" }
form:
notes: "The mid grey, the main shapes."
styles:
fill: { token: illustration/form, value: "#454545" }
accent:
notes: "The one green. A step deeper in light, where the bright green reads as a sticker."
styles:
fill: { token: illustration/accent, value: "#37d273" }
guidance:
status: proposed
use:
- title: A face for a card
text: Giving a card or a section a face, like the service cards on the portfolio site.
show: type=Design system
avoid:
- title: Standing in for an icon
text: Standing in for an icon next to a label. That's **Icon**, which is smaller and takes the text colour.
- title: Stretched bigger
text: Stretching it. It's drawn for 72px; bigger and the lines get heavy.
show: type=Design system
behaviour: |-
A fixed 72px square. Every drawing uses the same three colours: `illustration/shade`, the darkest, a step off the page; `illustration/form`, the mid grey; and `illustration/accent`, the green. In dark they're Figma's own. In light I picked the step that sits as far from the white page as the dark one sits from the black: shade and form are light greys, and the green goes one step deeper.
accessibility:
hidden: "Most of the time it's decoration beside a heading that says the same, so it's `aria-hidden=\"true\"`. That's the default."
labelled: "When it carries meaning on its own, pass `label`. It becomes `role=\"img\"` with that `aria-label`."
content: None. A label, when there is one, says what it stands for.
Install
npx github:Runceanu/rost add illustration It lands in src/rost/illustration/, with what it needs and its contract. Install has the rest.
When to use
A face for a card
Giving a card or a section a face, like the service cards on the portfolio site.
When not to use
Standing in for an icon
Standing in for an icon next to a label. That's Icon, which is smaller and takes the text colour.
Stretched bigger
Stretching it. It's drawn for 72px; bigger and the lines get heavy.
Behaviour
A fixed 72px square. Every drawing uses the same three colours: illustration/shade, the darkest, a step off the page; illustration/form, the mid grey; and illustration/accent, the green. In dark they're Figma's own. In light I picked the step that sits as far from the white page as the dark one sits from the black: shade and form are light greys, and the green goes one step deeper.
Accessibility
- Hidden
Most of the time it's decoration beside a heading that says the same, so it's
aria-hidden="true". That's the default. - Labelled
When it carries meaning on its own, pass
label. It becomesrole="img"with thataria-label.
Content
None. A label, when there is one, says what it stands for.
Props
| Prop | Type | Values | Default |
|---|---|---|---|
name | enum | activation-and-conversion · alignment · art · audit-and-strategy · best-idea · bridging-the-gaps · design-partner · design-system · design-system-leadership · efficiency · goal-focused · implementing · interactive-showcase · long-term-projects · mentoring · part-of-the-team · product-design · retention · scale-team · ship-best · simplicity-v-complexity · structured-system · timezones · ui | alignment |
label | slot | | |
Values
Straight from the contract. Each value sits next to its token, because six tokens here all come out as #3a3a3a and the colour alone can't tell you which one is right.
Never changes
root
-
width72pxspacing/size/2xlarge -
height72pxspacing/size/2xlarge
displayinline-block · vertical-alignmiddle · flex-shrink0
drawing
displayblock · width100% · height100%
shade
-
fill#232423illustration/shade
form
-
fill#454545illustration/form
accent
-
fill#37d273illustration/accent