# Frames

> Put a screenshot, diagram, or video in a bordered frame, with an optional caption below and a hint above.

A frame wraps an image or video in a rounded, bordered box so it stands apart from the text around it. Add a caption to explain what the reader is looking at.

<Frame caption="The Typemark logo, framed">
  <img src="https://docs.typemark.dev/assets/images/logo.svg" alt="Typemark logo" />
</Frame>

```mdx
<Frame caption="The Typemark logo, framed">
  <img src="/images/logo.svg" alt="Typemark logo" />
</Frame>
```

The image stretches to the full width of the frame.

## Hints

Use `hint` for a short note above the frame, like what to look for.

<Frame hint="Screenshots read best at full width." caption="Logomark">
  <img src="https://docs.typemark.dev/assets/images/logomark.svg" alt="Typemark logomark" />
</Frame>

```mdx
<Frame hint="Screenshots read best at full width." caption="Logomark">
  <img src="/images/logomark.svg" alt="Typemark logomark" />
</Frame>
```

## Markdown images

A frame takes Markdown image syntax too.

<Frame caption="Written as a Markdown image">
  ![Typemark logo](https://docs.typemark.dev/assets/images/logo.svg)
</Frame>

```mdx
<Frame caption="Written as a Markdown image">
  ![Typemark logo](/images/logo.svg)
</Frame>
```

## Image paths

Paths like `/images/logo.svg` or `images/logo.svg` point to files in your repository. If your site lives in a subfolder set by `docs_root` in `typemark.json`, paths are relative to that folder. Full `https://` URLs work as they are.

## Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `caption` | string | none | Centred text below the frame. |
| `hint` | string | none | Small text above the frame. |

Put the image or video between the tags. Images can be PNG, JPG, GIF, WebP, AVIF, or SVG; videos can be MP4, WebM, MOV, or M4V. A YouTube, Vimeo, Loom, or Wistia player works too: see [Videos](https://docs.typemark.dev/components/videos).

## In the visual editor

The visual editor shows a frame as read-only source and saves it back unchanged. Switch to source mode to edit it.

<Callout type="tip">
  Always set `alt` text on the image. The caption is for sighted readers; `alt` is for everyone else.
</Callout>
