Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions components/frames.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,28 @@

## Captions

You can add additional context to an image using the optional `caption` prop.
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">
<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>

## Hints

Add text that precedes the frame using the optional `hint` prop. Hints appear above the frame.

Check warning on line 23 in components/frames.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

components/frames.mdx#L23

Use 'preceding' instead of 'above'.

<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">
Optional caption text to show centered under your component.
Text that appears as part of the frame, centered below the content.
</ResponseField>

<ResponseField name="hint" type="string">
Text that precedes the frame.
</ResponseField>

<CodeGroup>
Expand All @@ -37,4 +49,16 @@
<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>