Figure
An image, a video or a drawing, with an optional caption under it and an optional panel behind it.
import { Figure } from "@dede-style/ui/figure", then put your own image inside it: <Figure caption="…"><img … /></Figure>. Figure never draws the image itself, so a plain <img>, Next’s Image, a <video>, an SVG or a component all work.
| Prop | Description | Default | Control |
|---|---|---|---|
| caption | text under the frame. Given, the figure is a <figure> and this its <figcaption>. Blank, it is a plain wrapper | ||
| surface | sunken puts the content in a rounded panel, in the sunken surface colour. None (default) shows the content alonenonesunken | none | |
| mode | put the panel in a mode, as Section’s mode. Light keeps a sketch’s panel light on a dark page. Panel onlyinheritlightdarkinverse | inherit |
|
| content | crop the content to this ratio of width to height, such as 16:9 or 1:1. An image, video or SVG inside fills it and is cut to fit. Blank keeps the content’s own shape | ||
| panel | give the panel this ratio of width to height, such as 16:9. Content taller than the panel runs off an edge. Blank, the panel is the content’s height plus its padding. Panel only | ||
| fit | the content’s width as a share of the frame: 0.85 is 85%. Without a panel, the caption takes the same width | 1 | |
| justify | where the content sits from side to side: start (left), center (default) or end (right)startcenterend | center |
|
| align | where the content sits from top to bottom, in a panel taller than it. Content taller than the panel starts at the top, unless end. Panel onlystartcenterend | center |
|
| padding | the panel’s padding at the top, a layout spacing step. None lets the content meet that edge. Panel onlynone00-250-511-523468 | 2 |
|
| padding | the panel’s padding at the bottom. None lets a tall document run off the bottom. Panel onlynone00-250-511-523468 | 2 |
|
| padding | the panel’s padding at the start (left). Panel onlynone00-250-511-523468 | 2 |
|
| padding | the panel’s padding at the end (right). Panel onlynone00-250-511-523468 | 2 |
|
| overflow | hidden (default) cuts the content off at the panel’s edge; visible lets it spill past. Panel onlyhiddenvisible | hidden | |
| border | a hairline round the content, for an image whose own edge is white. It is drawn over the content, so it takes no room | false | |
| rounded | round the content’s corners, for a photo standing alone. The panel is always rounded; content inside it is square unless this is on | false |
Tokens
What a theme can move, where the props above are what an instance can move.
| Token | Description | Value |
|---|---|---|
| --figure-radius | the corner of every panel, and of content with rounded on. 8px by default, the same as cards and fields | --radius-4 |
A token appears here only when the value is not already reachable. Anything that resolves through a foundation token or a role needs none, because overriding that already moves it — and a second dial wired to the same value would let this one component drift from everything sharing the role. What is left is the values with no other lever at all.
These are public and overridable — there is no private custom property, because anything on :root is reachable by any stylesheet. What replaces privacy is a stability contract: primitives may move, roles are the guarantee, and these are the per-component escape from both.