mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
660252b023
* Update components/frames.mdx Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> * Update components/frames.mdx Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> * Update components/frames.mdx Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
89 lines
3.1 KiB
Plaintext
89 lines
3.1 KiB
Plaintext
---
|
|
title: "Frames"
|
|
description: "Add visual emphasis with styled frames around images and other components."
|
|
keywords: ["image frames", "visual emphasis", "captions", "border"]
|
|
---
|
|
|
|
Use frames to display images, diagrams, 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 above 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>
|
|
|
|
## 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>
|
|
|
|
<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>
|