Files
mintlify__docs/components/frames.mdx
Ethan Palm 6c53a28e3a Document className and Tailwind arbitrary value support (#7301)
* Document className and Tailwind arbitrary value support

All built-in components now accept a className prop (mint#10540), and
dynamic Tailwind utilities work in className on MDX components
(mint#6737). Two pages stated the opposite.

- Correct the claims that Tailwind arbitrary values are unsupported in
  customize/custom-scripts and guides/custom-layouts
- Add className and arbitrary value guidance to the Tailwind section of
  custom-scripts, including the runtime-class limitation and the Tab
  content-panel caveat
- Add a Style components section to the components overview
- Add className property rows to every component reference page that
  supports it, and note the three components that do not
- Document inline Markdown support in component title props
- Correct the callouts page, which said typed callouts accept only
  children
- Replace inline style resizing with Tailwind classes in image embeds
- Add a help center article for Tailwind classes not applying in the
  editor's live preview, and note the limitation in custom-layouts
- Point skill.md at className before custom.css
- Accept className, keyframes, and unstyled in the Vale vocabulary

Resolves DOC-316, DOC-317

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Apply batched suggestions from code review

Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>

* Apply batched suggestions from code review

Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-08 16:54:20 -07:00

106 lines
3.7 KiB
Plaintext

---
title: "Frames"
description: "Wrap images, videos, and other components with the frame component to add styled borders, captions, and visual emphasis to your content."
keywords: ["image frames", "visual emphasis", "captions", "border"]
boost: 3
---
Use frames to display images, diagrams, videos, or other visual content with consistent styling and optional captions. Frames center content and provide visual separation from surrounding text.
<Frame>
<img src="https://mintlify-assets.b-cdn.net/yellowstone.jpeg" alt="Photograph of a lake surrounded by trees with mountains in the distance in Yellowstone National Park." />
</Frame>
## Captions
Add additional context to an image using the optional `caption` prop. Captions appear in the frame below the image.
<Frame caption="Yosemite National Park is visited by over 3.5 million people every year.">
<img src="https://mintlify-assets.b-cdn.net/yosemite.jpg" alt="Photograph of Yosemite Valley." />
</Frame>
### Markdown in captions
Captions support Markdown formatting, including links and bold text.
<Frame caption="Learn more about [Yosemite National Park](https://www.nps.gov/yose/index.htm) and plan your visit.">
<img src="https://mintlify-assets.b-cdn.net/yosemite.jpg" alt="Photograph of Yosemite Valley." />
</Frame>
<Frame caption="**Important:** Check the [park website](https://www.nps.gov/yose/index.htm) for current conditions.">
<img src="https://mintlify-assets.b-cdn.net/yellowstone.jpeg" alt="Photograph of a lake surrounded by trees with mountains in the distance in Yellowstone National Park." />
</Frame>
## Hints
Add text that precedes the frame using the optional `hint` prop. Hints appear before the frame.
<Frame hint="If you plan to visit Yosemite National Park, secure your permits before you go." caption="Yosemite National Park is visited by over 3.5 million people every year.">
<img src="https://mintlify-assets.b-cdn.net/yellowstone.jpeg" alt="Photograph of a lake surrounded by trees with mountains in the distance in Yellowstone National Park." />
</Frame>
## Videos
When you place a `video` element with `autoPlay` inside a frame, the frame adds `playsInline`, `loop`, and `muted` attributes.
```mdx Video with autoPlay
<Frame caption="Product demo">
<video autoPlay src="/path/to/video.mp4" />
</Frame>
```
Videos without `autoPlay` do not have any additional attributes added by default.
## Properties
<ResponseField name="caption" type="string">
Text that appears as part of the frame, centered below the content. Supports Markdown formatting including links and bold text.
</ResponseField>
<ResponseField name="hint" type="string">
Text that precedes the frame.
</ResponseField>
<ResponseField name="className" type="string">
Additional CSS classes to apply to the frame.
</ResponseField>
<CodeGroup>
```mdx Frame
<Frame>
<img src="/path/image.jpg" alt="Descriptive alt text" />
</Frame>
```
```mdx Frame with a caption
<Frame caption="Caption text">
<img src="/path/image.jpg" alt="Descriptive alt text" />
</Frame>
```
```mdx Frame with markdown in caption
<Frame caption="Visit the [documentation](/docs) for more details">
<img src="/path/image.jpg" alt="Descriptive alt text" />
</Frame>
```
```mdx Frame with bold text and links in caption
<Frame caption="**Note:** See the [official guide](https://example.com) for setup instructions">
<img src="/path/image.jpg" alt="Descriptive alt text" />
</Frame>
```
```mdx Frame with a hint
<Frame hint="Hint text">
<img src="/path/image.jpg" alt="Descriptive alt text" />
</Frame>
```
```mdx Frame with both hint and caption
<Frame hint="Hint text" caption="Caption text">
<img src="/path/image.jpg" alt="Descriptive alt text" />
</Frame>
```
</CodeGroup>