Figure
A figure with its caption: the media, then a label ("Fig. 3"), a caption that says what to notice, and a credit in the same run. Text never sits on the image.
import { Figure, FigureCaption, FigureMedia } from '@fairgarden/design/data/figure'
The label is set in the mono data face, the caption in caption type and the credit ("Photo: Name / Program") in small type, all in the muted ink. Number figures only where the text refers to them, but give every figure a caption or a credit, because print needs one.
Photo, technical figure and plate
Photo, technical figure and plate
photo is the default: an editorial photo with an 8 px radius (squared when it runs full-bleed) and its caption right-flush below it. technical is for charts, diagrams and drawings: square, never scaled up, with the caption left-aligned below and the label on its own line; framed adds a 1 px rule frame. plate is a specimen plate: the media becomes a nested white face over a fine dot grid, framed in that face's own edge color. It is a light island inside a field or the night band, so a two-ink chart can sit on it on any ground. number generates "Fig. 3", numbering="catalog" gives "Figure 001", and detail marks a crop.
Side caption
Side caption
With sideCaption, the caption moves into the adjacent column once the figure itself is at least 768 px wide, top-aligned beside the media. Narrower, it stays below.
In print
A figure never separates from its caption. Content photos print in grayscale inside a 0.75 pt frame, no taller than 100 mm; decorative photos (empty alt) are left out. The plate's dot grid drops, and its frame prints black.
API Reference
Figure
The figure. Put a FigureMedia and a FigureCaption inside. Every
figure gets a caption or a credit, for print; figure and caption never
separate across printed pages.
| Prop | Type | Description |
|---|---|---|
framed | | Technical figures: a |
kind | |
|
primary | | Primary Radix scale: caption, label, credit and frames. Never defaulted; omitted, it inherits the scope [D133]. |
secondary | | Secondary Radix scale: unused by the figure itself. Never defaulted. |
sideCaption | | From 768 px of the figure’s width, the caption sits in the adjacent
column, top-aligned, beside the media. Default |
FigureMedia
The media box: an img, svg or chart. Photos fill the column;
technical figures keep their native width and never scale up [D78]. A
decorative photo (empty alt) is left out of print. On a plate it is the
nested white face, which takes the figure’s primary and secondary.
FigureCaption
The caption: the label in type-data, the caption text (the children)
in type-caption and the credit in type-small, all --role-muted.
Number figures only where the text refers to them.
| Prop | Type | Description |
|---|---|---|
label | | Replaces the generated label entirely. |
credit | | The credit, in the same run: “Photo: Name / Program” ( |
detail | | Adds “(DETAIL)” to the label, for a crop. |
number | | The figure number; renders “Fig. 3″ (or “Figure 003″ with |
numbering | |
|
Additional types
FigureCaptionProps
Props for FigureCaption: figcaption props plus the numbering and the credit.
type FigureCaptionProps = React.ClassAttributes<HTMLElement> &
React.HTMLAttributes<HTMLElement> & {
number?: number | string;
numbering?: 'short' | 'catalog';
label?: React.ReactNode;
detail?: boolean;
credit?: React.ReactNode;
}FigureMediaProps
Props for FigureMedia: div props.
type FigureMediaProps = React.ComponentPropsWithRef<'div'>FigureProps
Props for Figure: figure props and the kind, frame, caption-placement and color axes.
type FigureProps = React.ClassAttributes<HTMLElement> &
React.HTMLAttributes<HTMLElement> & {
kind?: 'photo' | 'technical' | 'plate' | null;
framed?: boolean;
sideCaption?: boolean;
primary?:
| 'ruby'
| 'olive'
| 'sage'
| 'slate'
| 'sand'
| 'gray'
| 'mauve'
| 'brown'
| 'bronze'
| 'gold'
| 'red'
| 'crimson'
| 'tomato'
| 'pink'
| 'plum'
| 'indigo'
| 'iris'
| 'violet'
| 'purple'
| null;
secondary?:
| 'ruby'
| 'olive'
| 'sage'
| 'slate'
| 'sand'
| 'gray'
| 'mauve'
| 'brown'
| 'bronze'
| 'gold'
| 'red'
| 'crimson'
| 'tomato'
| 'pink'
| 'plum'
| 'indigo'
| 'iris'
| 'violet'
| 'purple'
| 'amber'
| 'blue'
| 'cyan'
| 'grass'
| 'green'
| 'jade'
| 'lime'
| 'mint'
| 'orange'
| 'sky'
| 'teal'
| 'yellow'
| null;
}Specification: DESIGN-SYSTEM.md §8.5 (figures and captions).