Currently brewing — dede is in beta: a first set of components, with more to come. The API may still change.

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.

Placeholder photo: hills and a lake at dusk
Hills and a lake at dusk. A placeholder photo.
PropDescriptionDefaultControl
captiontext under the frame. Given, the figure is a <figure> and this its <figcaption>. Blank, it is a plain wrapper
surfacesunken puts the content in a rounded panel, in the sunken surface colour. None (default) shows the content alonenonesunkennone
modeput the panel in a mode, as Section’s mode. Light keeps a sketch’s panel light on a dark page. Panel onlyinheritlightdarkinverseinherit
  • inherit
  • light
  • dark
  • inverse
contentRatiocrop 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
panelRatiogive 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
fitthe content’s width as a share of the frame: 0.85 is 85%. Without a panel, the caption takes the same width1
justifywhere the content sits from side to side: start (left), center (default) or end (right)startcenterendcenter
  • start
  • center
  • end
alignwhere 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 onlystartcenterendcenter
  • start
  • center
  • end
paddingTopthe panel’s padding at the top, a layout spacing step. None lets the content meet that edge. Panel onlynone00-250-511-5234682
  • none
  • 0
  • 0-25
  • 0-5
  • 1
  • 1-5
  • 2
  • 3
  • 4
  • 6
  • 8
paddingBottomthe panel’s padding at the bottom. None lets a tall document run off the bottom. Panel onlynone00-250-511-5234682
  • none
  • 0
  • 0-25
  • 0-5
  • 1
  • 1-5
  • 2
  • 3
  • 4
  • 6
  • 8
paddingStartthe panel’s padding at the start (left). Panel onlynone00-250-511-5234682
  • none
  • 0
  • 0-25
  • 0-5
  • 1
  • 1-5
  • 2
  • 3
  • 4
  • 6
  • 8
paddingEndthe panel’s padding at the end (right). Panel onlynone00-250-511-5234682
  • none
  • 0
  • 0-25
  • 0-5
  • 1
  • 1-5
  • 2
  • 3
  • 4
  • 6
  • 8
overflowhidden (default) cuts the content off at the panel’s edge; visible lets it spill past. Panel onlyhiddenvisiblehidden
bordera hairline round the content, for an image whose own edge is white. It is drawn over the content, so it takes no roomfalse
roundedround the content’s corners, for a photo standing alone. The panel is always rounded; content inside it is square unless this is onfalse

Tokens

What a theme can move, where the props above are what an instance can move.

TokenDescriptionValue
--figure-radiusthe 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.