---
title: Frame
description: Wrap images and demos in a styled bordered container with optional captions. Makes screenshots stand out.
---

> **For AI agents:** the complete documentation index is at [llms.txt](/docs/llms.txt). Append `.md` to any page URL for its markdown version.

Frame wraps images and demos in a bordered container with optional captions.

Use Frame when you want to:
- Give screenshots and UI images a finished look
- Add captions to explain what readers are seeing
- Distinguish demo output from regular content
- Create visual consistency across your documentation

## Usage

```mdx
<Frame caption="Architecture diagram">
  ![Diagram](/images/city-skyline.jpg)
</Frame>
```

## Basic Frame

<Frame>
  ![City skyline](/images/city-skyline.webp)
</Frame>

```mdx
<Frame>
  ![City skyline](/images/city-skyline.webp)
</Frame>
```

## With Caption

Add a caption below the frame:

<Frame caption="New York City at dusk">
  ![City skyline](/images/city-skyline.webp)
</Frame>

```mdx
<Frame caption="New York City at dusk">
  ![City skyline](/images/city-skyline.webp)
</Frame>
```

## Framing Other Content

Frame works with any content, not just images:

<Frame caption="Example code output">
```
✓ Build completed successfully
✓ 42 pages generated
✓ Deployed to production
```
</Frame>

## When NOT to Use Frame

- **Inline decorative images** - Regular markdown images are fine for illustrations
- **Icons or small graphics** - Frame adds unnecessary visual weight
- **Images that flow with text** - Frame creates a visual break; use for standalone visuals

## Best Practices

- **Keep captions concise** - One sentence that explains what the reader is seeing
- **Use consistently** - If you frame one screenshot, frame all screenshots for visual consistency
- **Don't over-frame** - Reserve frames for important visuals, not every image on the page

## Props

<ParamField name="caption" type="string">
  Optional text below the frame.
</ParamField>

## What's Next?

<Columns cols={2}>
  <Card title="Components Overview" icon="puzzle-piece" href="/components/overview">
    Browse all available components
  </Card>
  <Card title="MDX Basics" icon="file-code" href="/content/mdx-basics">
    Learn how to use components in MDX
  </Card>
</Columns>
