---
title: "Markdown snippets"
subtitle: "<Markdown> (aliases <Snippet>, <Include>) inserts a reusable snippet file."
---

Inserts a reusable snippet file into the page (aliases `<Snippet>`, `<Include>`). Any extra props replace placeholders in the snippet:

```mdx
<Markdown src="/snippets/install-cli.mdx" />
<Snippet file="node-requirement.mdx" node="22.13" cli="0.1.0" />
```

<Snippet file="node-requirement.mdx" node="22.13" cli="0.1.0" />

<ParamField path="src" type="string">Snippet path (`file` and `path` also work): `/snippets/x.mdx` is relative to the project root, `./x.mdx` is relative to the current file, and a bare file name is looked up under `snippets/` at the project root.</ParamField>
<ParamField path="Other props" type="string | number">Replace `\{name\}` placeholders in the snippet body.</ParamField>

A missing snippet raises a `snippet/missing` error. For path rules, `import` syntax, and escaping requirements for placeholders, see [Reusable snippets and variables](../writing/snippets.mdx).
