Display

Captioned Figure Frame

A frame with a numbered caption below the content: the figure number, the text and the source line sit on three levels, so the caption reads instead of blurring together.

  • frame
  • caption
  • figure
  • gallery

Preview

1440pxHost theme

Use it with AI

  1. 1. Copy the link.
  2. 2. Write to your agent in your own words and drop the link into the sentence.
  3. 3. The agent opens the link and installs the component from the registry.

put this in the header: https://vibeui.ru/c/frame-006?lang=en

Место под скриншот
Рис. 2

The catalog card expands the preview on hover

Источник: скриншот VibeUI, август 2026
Show the full instructions

What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.

# Install and place "frame-006" (Captioned Figure Frame) from VibeUI

## 1. Install first — do not skip, do not recreate
Run this exact command before writing any code:
npx shadcn@latest add https://vibeui.ru/r/frame-006.json

Registry item: https://vibeui.ru/r/frame-006.json
Installs to: components/vibeui/frame-006.tsx (the exact path follows this project's components.json aliases).
npm dependencies: none.
Registry dependencies: none.

Install it from the registry. Do not recreate it from the description,
do not substitute a similar component from another library, and do not
rewrite it to match the project's existing style.

## 2. What it is
A frame with a numbered caption below the content: the figure number, the text and the source line sit on three levels, so the caption reads instead of blurring together.

A captioned frame: figure number, caption text and source line as three rows inside figcaption. Zero dependencies, one file, no client JS.

## 3. How to use it
import { Frame006 } from "@/components/vibeui/frame-006"

<Frame006
  index={2}
  caption="The catalog card expands the preview on hover"
  source="Source: VibeUI screenshot"
  align="start"
>
  <img src="/shots/catalog.png" alt="Catalog" />
</Frame006>

Read the installed file for the full prop list.

## 4. Where to place it
This is a small inline component. Put it exactly where the user asked,
inside the existing markup. Do not create a new page, section or
wrapper for it. If a similar control already sits in that spot,
replace it instead of adding a second one.

Placement: ___
(The user fills this line in. If it is still blank, ask where to put it
instead of guessing.)

## 5. Keep exactly as installed
- the local --vibeui-frame-006-* palette — do not swap it for your theme tokens
- the figure + figcaption pairing: an image with a neighbouring paragraph loses the link for screen readers
- the figure number as a separate nowrap element — otherwise "Fig. 12" breaks across lines
- the different sizes of caption and source: merged rows read as one sentence
- the media slot ratio: without it the caption jumps with every image height
- the component's own light surface: the caption is dark and disappears on a dark catalog background

## 6. You may change
- the caption text through caption
- the figure number through index
- the provenance line through source
- the caption alignment through align

## 7. Rules
- Numbering is manual: a page-wide sequence is done with a CSS counter on the parent.
- An empty source removes the third row — check the caption still looks finished without it.
- A caption is not alternative text: the image still needs its alt.
- Do not lift the CSS variables into globals.css: the component has to stay a single file.

## 8. Verify
- it renders with no console errors;
- it looks like the preview on the VibeUI page you copied this from;
- if it does not, you changed something listed in section 5 — put it back.

For developers

npx shadcn@latest add https://vibeui.ru/r/frame-006.json
https://vibeui.ru/r/frame-006.json

Серверный компонент, хуков нет. Разметка — figure с figcaption внутри, а не картинка и абзац рядом: только так связь изображения и подписи видна скринридеру. Номер рисунка вынесен в отдельный элемент с white-space:nowrap, поэтому «Рис. 12» не разрывается переносом; текст подписи и строка источника отличаются кеглем и цветом, иначе всё склеивается в одно предложение. Медиа-слот держит пропорцию 16 / 10, чтобы подпись не уезжала при разной высоте картинок. Выравнивание переключается атрибутом data-align. Подложка светлая: вся типографика подписи тёмная.

Component source

The same file your agent installs. Here in case you would rather copy it by hand.

import type { ComponentPropsWithoutRef, CSSProperties, ReactNode } from "react"

export type Frame006Props = ComponentPropsWithoutRef<"figure"> & {
  caption?: string
  index?: number
  source?: string
  align?: "start" | "center"
  children?: ReactNode
}

// Идея компонента: рамка с подписью под содержимым. Подпись — это figcaption
// внутри figure, а не абзац рядом: только так связь картинки и текста видна
// скринридеру. Номер рисунка набран отдельным элементом и не переносится
// вместе с текстом; источник вынесен в третью строку, потому что слитая
// подпись «Рис. 2. Каталог. Скриншот» читается как одно предложение.
const STYLES = `
:where([data-vibeui-block="frame-006"]){
--vibeui-frame-006-bg:oklch(1 0 0);
--vibeui-frame-006-media:oklch(0.96 0.004 265);
--vibeui-frame-006-fg:oklch(0.23 0.014 265);
--vibeui-frame-006-muted:oklch(0.55 0.014 265);
--vibeui-frame-006-border:oklch(0.9 0.006 265);
--vibeui-frame-006-accent:oklch(0.52 0.16 262);
--vibeui-frame-006-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
[data-vibeui-block="frame-006"]{
display:flex;flex-direction:column;gap:0.625rem;margin:0;
width:100%;max-width:30rem;box-sizing:border-box;padding:0.75rem;
background:var(--vibeui-frame-006-bg);
border:1px solid var(--vibeui-frame-006-border);border-radius:1rem;
font-family:var(--vibeui-frame-006-font);color:var(--vibeui-frame-006-fg);
}
[data-vibeui-block="frame-006"] *{box-sizing:border-box}
[data-vibeui-block="frame-006"] [data-part="media"]{
overflow:hidden;aspect-ratio:16 / 10;
background:var(--vibeui-frame-006-media);
border:1px solid var(--vibeui-frame-006-border);border-radius:0.75rem;
}
[data-vibeui-block="frame-006"] [data-part="media"] > *{display:block;width:100%}
[data-vibeui-block="frame-006"] img{display:block;width:100%;height:100%;object-fit:cover}
[data-vibeui-block="frame-006"] [data-part="stub"]{
display:grid;place-items:center;height:100%;padding:1rem;
font-size:0.8125rem;color:var(--vibeui-frame-006-muted);
}
[data-vibeui-block="frame-006"] figcaption{
display:flex;flex-direction:column;gap:0.1875rem;
font-size:0.8125rem;line-height:1.45;
}
[data-vibeui-block="frame-006"][data-align="center"] figcaption{align-items:center;text-align:center}
/* Номер отдельным элементом: он не должен переноситься вместе с подписью. */
[data-vibeui-block="frame-006"] [data-part="index"]{
color:var(--vibeui-frame-006-accent);font-weight:700;
font-variant-numeric:tabular-nums;white-space:nowrap;
}
[data-vibeui-block="frame-006"] [data-part="text"]{margin:0}
[data-vibeui-block="frame-006"] [data-part="source"]{
font-size:0.6875rem;color:var(--vibeui-frame-006-muted);
}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="frame-006"] *{animation:none!important;transition:none!important}}
`

/**
 * Рамка с нумерованной подписью и строкой источника под содержимым.
 * Один файл, ноль зависимостей, собственная палитра.
 */
export function Frame006({
  caption = "Каталог компонентов: карточка раскрывает превью по наведению",
  index = 2,
  source = "Источник: скриншот VibeUI, август 2026",
  align = "start",
  children,
  className,
  style,
  ...props
}: Frame006Props) {
  return (
    <>
      <style href="vibeui-frame-006" precedence="medium">
        {STYLES}
      </style>
      <figure
        {...props}
        data-vibeui-block="frame-006"
        data-align={align}
        className={className}
        style={style as CSSProperties}
      >
        <div data-part="media">
          {children ?? <div data-part="stub">Место под скриншот</div>}
        </div>
        <figcaption>
          <span data-part="index">Рис. {index}</span>
          <p data-part="text">{caption}</p>
          {source ? <span data-part="source">{source}</span> : null}
        </figcaption>
      </figure>
    </>
  )
}