Figure

Semantic figures without classes: the image scales with the figure and the caption stays visually secondary.

Description

figure takes the full width with no margin, its img scales to 100% with the panel border radius, and figcaption renders at 0.75rem, right-aligned.

The radius follows $border-radius-panel (tune it with --forma-border-radius-panel), and the caption size and alignment can be overridden per element in a style attribute.

Figure with caption

No classes, no wrapper divs: the image never overflows its container and the caption stays visually secondary next to the content.

Ink diffusing in water
Docs homepage preview
HTML
<figure>
  <img src="/db/images/ink/ink_water.1794581366.avif" alt="Ink diffusing in water">
  <figcaption>Docs homepage preview</figcaption>
</figure>