Welcome to Vanilla Breeze
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
The figcaption element provides a caption or legend for the content of its parent figure element.
The <figcaption> element represents a caption or legend describing the contents of its parent <figure> element. It can appear as the first or last child of the figure, and there can only be one figcaption per figure.
Vanilla Breeze styles figcaption with muted text color and smaller font size, with variants for alignment and visibility.
Figcaption can appear at the beginning or end of a figure.
<figure> <img src="photo.jpg" alt="..." /> <figcaption>Caption after content</figcaption></figure>
<figure> <figcaption>Caption before content</figcaption> <img src="photo.jpg" alt="..." /></figure>
<figure> <img src="photo.jpg" alt="..." /> <figcaption class="centered">Centered caption</figcaption></figure>
<figure> <img src="photo.jpg" alt="..." /> <figcaption class="end">End-aligned caption</figcaption></figure>
Provides caption for screen readers without visible display.
The figure above has a visually hidden caption.
<figure> <img src="photo.jpg" alt="..." /> <figcaption class="hidden">Screen reader only caption</figcaption></figure>
Figcaption can contain various types of content.
<figcaption><strong>Figure 1:</strong> Description text.</figcaption>
Team photo at annual retreat
Left to right: Alice (Engineering), Bob (Design), Carol (Product). Photo taken at Lake Tahoe, December 2025.
In code figures, captions typically show the filename.
const sum = (a, b) => a + b;
console.log(sum(2, 3)); // 5/code
In quote figures, captions provide attribution.
Design is not just what it looks like and feels like. Design is how it works.
When a <figure> contains a <figcaption>, screen readers announce the figure and its caption together, providing context for the content.
These serve different purposes and shouldn't duplicate each other:
| Attribute/Element | Purpose | Audience |
|---|---|---|
alt |
Describes the image itself | Screen reader users (replaces image) |
<figcaption> |
Provides context about why the image is shown | All users (supplements image) |
<!-- Good: Different information in each --><figure> <img src="chart.png" alt="Bar chart showing sales increasing from $10M in Q1 to $15M in Q4" /> <figcaption> Figure 2: Sales exceeded projections in all quarters. </figcaption></figure> <!-- Bad: Duplicate information --><figure> <img src="chart.png" alt="Sales exceeded projections in all quarters" /> <figcaption> Sales exceeded projections in all quarters. </figcaption></figure>
Use .hidden when captions are needed for accessibility but not visually.
<figure> <img src="decorative-divider.svg" alt="" /> <figcaption class="hidden">Decorative section divider</figcaption></figure>
<figure> - Parent element that contains figcaption<img> - Images that figcaptions describe<blockquote> - Quotations that may have figcaption attributionStyles defined in /src/native-elements/figure/styles.css
| Selector | Properties |
|---|---|
figcaption |
font-size: var(--font-size-sm); color: var(--color-text-muted); margin-block-start: var(--size-s); |
figcaption.centered |
text-align: center; |
figcaption.end |
text-align: end; |
figcaption.hidden |
position: absolute; clip: rect(0,0,0,0); etc. |
figure.bordered > figcaption |
margin-block-start; padding-block-start; border-block-start; |
figure.code > figcaption |
padding; background; border-radius; font-family: mono; |
figure.quote > figcaption |
font-style: normal; ::before adds em-dash; |