Skip to content
Component installs need the registry setup— the Base UI shadcn project, the @vegastack namespace and the Cloudflare Access service token.
VegaStack Design

Figure Frame

A sharp-cornered media frame with an optional mono FIG-annotation caption.

Status
stable
Since
0.1.0
Accessibility pattern
figure with caption

Last updated

16:9 media
FIG. 01Component registry — live preview

Install

Add Figure Frame from the VegaStack registry. The CLI verifies the item's integrity hash before writing it.

pnpm dlx shadcn@latest add @vegastack/figure-frame

Usage

import { FigureFrame } from "@/components/ui/figure-frame";

<FigureFrame figureNumber="01" caption="Component registry — live preview">
  <img src="/screenshot.png" alt="The VegaStack component registry" />
</FigureFrame>;

Examples

16:9 media
FIG. 01Component registry — live preview

The marketing "sharp" gesture

FigureFrame uses rounded-(--radius-sharp) (2px) — the marketing sharp gesture is rationed to CTAs, chips, and figure frames (audit 17-brand-direction §Shape). Product surfaces keep the 6/8/12px radius scale unchanged; this is the one deliberate exception.

Aspect ratio

aspectRatio accepts any CSS aspect-ratio value ("16/9" default, "1/1", "4/3", …).

1:1
FIG. ASquare
4:3
FIG. BStandard

Without a caption

caption and figureNumber are both optional — omit them for a bare frame.

No caption

API Reference

PropTypeDefaultDescription
children*React.ReactNodeThe framed media — an image, video, or a live component demo. Fills the frame at aspectRatio.
aspectRatiostring'16/9'CSS aspect-ratio for the media area (e.g. "16/9", "4/3", "1/1").
captionReact.ReactNodeFIG-annotation caption text. Rendered in the mono voice (font-mono + text-mono-label, uppercase — the spec's 12px floor; this component intentionally does not reach for the spec's optional 10px FIG-annotation minimum, since no token below 12px is shipped yet — see the component's audit note).
figureNumberReact.ReactNodeFigure number/id prefixed as FIG. {figureNumber} before the caption (e.g. figureNumber="01""FIG. 01"). Omit for a caption with no numbering.

Data attributes and CSS variables on FigureFrame

AttributeValues
data-slot"figure-frame" | "figure-frame-caption" | "figure-frame-caption-text" | "figure-frame-media" | "figure-frame-number"
--figure-frame-ratioCSS custom property

Accessibility

  • Renders a semantic <figure> / <figcaption> pair — the caption is real, readable text associated with its figure.
  • The caption uses the mono voice at its 12px floor (text-mono-label) — this component intentionally does not reach for the spec's optional 10px FIG-annotation minimum, since no token below 12px is shipped yet.
  • The framed media (an <img>, video, or live demo) must carry its own accessible description (e.g. alt text) — FigureFrame adds no accessibility semantics to its children.
ContractStates tested
Behaviourdefault
Accessibilitynative-or-base-ui-semantics, browser-accessibility-test
Visualdefault

Do / Don't

Do
Use FigureFrame to frame a single screenshot, video, or live demo on a marketing surface.
Don't
Nest multiple unrelated pieces of content inside one FigureFrame — it's a frame for ONE figure.

On this page