Semantic figure/figcaption wrapper for any media or illustration. Caption and credit render below the content; Media composes Figure for aspect-ratio frames.
Design intent
Figure gives any media or illustration a semantic figure/figcaption pairing so captions are associated with content for assistive tech and SEO, with an optional credit line for attribution.
npx @slipstream-ui/cli@latest add figureProps
| Prop | Type | Default | Description |
|---|---|---|---|
| caption | ReactNode | — | Caption content rendered in <figcaption>. |
| credit | ReactNode | — | Optional source/attribution line under the caption. |
| align | 'left' | 'center' | 'left' | Caption text alignment. |
| className | string | — | Additional CSS classes to apply. |
Anti-patterns
validate_usage is the MCP tool that rejects these mistakes: the same list agents see over MCP and in the canonical markdown.
Don't use Figure for layout grouping
Figure is semantic media markup. For generic grouping use Card, Section or a plain div.
tsx// Avoid<Figure><div>Card content</div></Figure>// Prefer<Card>...</Card>
Accessibility
- Renders <figure> with <figcaption>, so captions are programmatically associated with the content.
- Ensure the media itself has alt text or an accessible name.
Content guidelines
Captions
- Describe what the media shows, not 'image of'
- Keep captions to one sentence
- Use credit for source attribution only
Good examples
- Salt Lake City studio, March 2026
- Source: NDCA results
Bad examples
- Picture
- Click to enlarge
Composition
Compose with Media: Media composes Figure internally to add the aspect frame and image handling
<Media src="/a.jpg" alt="A" caption="Caption"/>
Compose with CoverImage: CoverImage renders the seeded placeholder art that typically sits inside a Figure
<Figure caption="Cover"><CoverImage seed={slug} mark={<Icon/>}/></Figure>
Related components: Media, CoverImage, Prose
Dependencies
What the registry installs alongside this component. Package imports already include these.
npm packages
- class-variance-authority
- clsx
- tailwind-merge
Browser support
| Browser | Tested versions |
|---|---|
| Chrome | 111+ (Mar 2023) |
| Edge | 111+ (Mar 2023) |
| Firefox | 121+ (Dec 2023) |
| Safari | 17.2+: macOS & iOS (Dec 2023) |
Slipstream components rely only on CSS custom properties, Flexbox/Grid, and ARIA, the everyday baseline of the last two years of evergreen releases. Anything newer is progressive enhancement: unsupported browsers keep full functionality with static behavior instead of animations.