{"name":"figure-caption","entry":"component","title":"FigureCaption","description":"An editorial figure label, caption, and provenance that wraps on narrow screens.","category":"UI","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/figure-caption","installName":"figure-caption","page":"https://jbm-ui.bns.studio/c/figure-caption","registryItem":"https://jbm-ui.bns.studio/r/figure-caption.json","sourcePath":"registry/jbm/ui/figure-caption.tsx","files":[{"source":"registry/jbm/ui/figure-caption.tsx","target":"src/jbm/ui/figure-caption.tsx","import":"@/jbm/ui/figure-caption","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/figure-caption.md","json":"https://jbm-ui.bns.studio/catalog/figure-caption.json"},"snippet":"import { FigureCaption } from \"@/jbm/ui/figure-caption\"\n\n<figure>\n  <img src=\"/chart.png\" alt=\"Descripción del gráfico\" />\n  <FigureCaption index=\"01\" provenance=\"Fuente: nuestro estudio\">\n    Menos ruido. Más señal.\n  </FigureCaption>\n</figure>","api":[{"export":"FigureCaption","kind":"component","summary":"A <figcaption> with a hairline top rule: an optional vermilion `Fig. <index>` label, the caption text (18px bold), and optional mono provenance below. Place it as the first or last child of a <figure>; figcaption attributes and ref pass through.","props":[{"name":"index","type":"React.ReactNode","required":false,"default":null,"description":"Figure number or label, rendered as `Fig. <index>` in uppercase vermilion mono. Omit (null/undefined) to hide."},{"name":"provenance","type":"React.ReactNode","required":false,"default":null,"description":"Optional source or credit line under the caption, 12px dim mono."},{"name":"layout","type":"\"inline\" | \"stacked\"","required":false,"default":"\"inline\"","description":"\"inline\" places the label beside the caption and wraps below it when narrower than about 180px of caption room; \"stacked\" always puts the label above."}],"passthrough":["React.ComponentPropsWithRef<\"figcaption\">"]}],"stage":{"mode":"fluid","reason":"Width fills the figure. Height is 18px top padding plus the 1px border, the caption lines (18px × 1.4), and optional provenance (8px + 12px × 1.6 per line); stacked layout, or inline layout that wraps, adds the label line plus a 10px gap."},"examples":[{"title":"Caption a chart","code":"import { FigureCaption } from \"@/jbm/ui/figure-caption\"\n\n<figure>\n  <img src=\"/chart.png\" alt=\"Descripción del gráfico\" />\n  <FigureCaption index=\"01\" provenance=\"Fuente: nuestro estudio\">\n    Menos ruido. Más señal.\n  </FigureCaption>\n</figure>"}],"qa":["Compare inline and stacked layouts; in inline, narrow the screen until the caption wraps below the label without overlap.","Check with and without index and provenance: no empty gaps appear when either is omitted.","Confirm it is used inside a <figure> so the caption is associated with the visual."],"related":[{"name":"tokens","relation":"installs"}],"setup":{"namespace":"@jbm","componentsJson":{"registries":{"@jbm":"https://jbm-ui.bns.studio/r/{name}.json"}},"command":"npx shadcn@latest add @jbm/<name>","target":"src/jbm/","importAlias":"@/jbm/…","tsconfigPaths":{"@/*":["./src/*"]}},"rules":["Install through the @jbm namespace: each registry item JSON (/r/<name>.json) carries its files' contents and each guide is served at /docs/<slug>.md, so agents never need the source repository (it is public on GitHub for people browsing the code).","Files install to src/jbm/ and import as @/jbm/…, which needs the @/* → ./src/* path alias in tsconfig.json.","Items marked needsRemotion require the remotion package and must render inside a Remotion composition or Player; every other item works in any React page.","Use one vermilion accent per composition; accent2 is for annotations only and soft is for dark surfaces only.","Stages are 1920×1080 landscape and 1080×1920 vertical with declared safe areas; each item's stage field declares its size in stage pixels, and scenes compose from YAML-shaped specs with @jbm/scene-spec."],"links":{"catalog":"https://jbm-ui.bns.studio/catalog.json","llms":"https://jbm-ui.bns.studio/llms.txt"}}