MDC Components
MDC syntax lets you use Vue components in Markdown: block components are written ::name, inline components :name, props go in {} or a YAML block, and each nesting level adds one more colon.
Callout
Callouts highlight information that sits alongside the main text. note, tip, warning and caution are shortcuts with a preset icon and color:
title frontmatter field, so the body starts at level two.app.config.ts do not require restarting the dev server.NUXT_GITHUB_TOKEN to a public repository. ::note
The page title comes from the `title` frontmatter field, so the body starts at level two.
::
::tip
Changes to `app.config.ts` do not require restarting the dev server.
::
::warning
The MCP Server cannot be disabled while AI Chat is enabled.
::
::caution
Never commit `NUXT_GITHUB_TOKEN` to a public repository.
::
::: ::
The generic callout takes icon and color. Every callout accepts NuxtLink props, and with to the whole callout becomes clickable:
::callout{icon="i-lucide-square-play" color="neutral" to="/en/docs/getting-started/installation"}
New here? Start with the installation.
::
Badge
The default slot of badge accepts Markdown, which suits versions and statuses:
::badge
**v3.0.0**
::
Card and CardGroup
card highlights a piece of content or an entry point and accepts title, icon, color and NuxtLink props. Wrap cards in card-group for a grid:
::card-group
:::card
---
icon: i-lucide-compass
title: Guide
to: /en/docs/guide/configuration
---
Configuration, theme, navigation and deployment.
:::
:::card
---
icon: i-lucide-sparkles
title: AI
to: /en/docs/ai/ai-chat
---
AI Chat, MCP Server and llms.txt.
:::
::
Accordion
accordion and accordion-item fold several questions and answers into panels, which suits FAQs:
content/docs/, other languages in content/{locale}/docs/, and the route prefix is always /docs.app.config.ts is read at runtime and hot-reloads in the dev server.github: false in app/app.config.ts. ::accordion
:::accordion-item{icon="i-lucide-circle-help" label="Where do docs pages go?"}
Pages in the default language go in `content/docs/`, other languages in `content/{locale}/docs/`, and the route prefix is always `/docs`.
:::
:::accordion-item{icon="i-lucide-circle-help" label="Does changing app.config.ts need a restart?"}
No. `app.config.ts` is read at runtime and hot-reloads in the dev server.
:::
:::accordion-item{icon="i-lucide-circle-help" label="How do I turn off the GitHub integration?"}
Set `github: false` in `app/app.config.ts`.
:::
::
::: ::
Collapsible
collapsible hides its content until expanded, which suits long secondary tables:
| Field | Default | Description |
|---|---|---|
theme.radius | 0.25 | Global border radius in rem |
theme.font | editorial | Heading font style |
theme.grain | false | Paper grain on the background |
::collapsible
| Field | Default | Description |
| --- | --- | --- |
| `theme.radius` | `0.25` | Global border radius in rem |
| `theme.font` | `editorial` | Heading font style |
| `theme.grain` | `false` | Paper grain on the background |
::
Tabs
tabs and tabs-item show interchangeable content side by side, such as two ways to configure the same thing:
export default defineAppConfig({
header: { title: 'My Docs' }
})
export default defineNuxtConfig({
extends: ['@movk/nuxt-docs']
})
::tabs
:::tabs-item{icon="i-lucide-file-cog" label="app.config.ts"}
```ts [app/app.config.ts]
export default defineAppConfig({
header: { title: 'My Docs' }
})
```
:::
:::tabs-item{icon="i-lucide-settings" label="nuxt.config.ts"}
```ts [nuxt.config.ts]
export default defineNuxtConfig({
extends: ['@movk/nuxt-docs']
})
```
:::
::
Steps
steps renders headings of the given level as numbered steps; level picks the heading level:
Create a project
npx nuxi init -t gh:mhaibaraai/movk-nuxt-docs/templates/default my-docs
```
#### Start the dev server
```bash [Terminal]
cd my-docs && pnpm dev
```
::::
:::
:::tabs-item{icon="i-lucide-code" label="Code"}
````mdc
::steps{level="4"}
#### Create a project
```bash [Terminal]
npx nuxi init -t gh:mhaibaraai/movk-nuxt-docs/templates/default my-docs
Start the dev server
cd my-docs && pnpm dev
::
:::
::
::tip
Headings inside `steps` do not appear in the table of contents and are not numbered like second-level headings; `level="4"` is recommended.
::
## `Field` and `FieldGroup`
`field` describes a parameter or prop: `name` and `type` show in the heading line and `required` marks it as required. Combine fields into a list with `field-group`:
::code-preview
:::field-group{.my-0}
::::field{name="componentDocs" type="boolean"}
Component docs such as ComponentProps and ComponentExample, `false` by default.
::::
::::field{name="mcp" type="boolean"}
Built-in MCP Server, required by AI Chat, `true` by default.
::::
::::field{name="ogImage" type="boolean"}
Build-time OG image generation, `true` by default.
::::
::::field{name="mermaid" type="boolean"}
Mermaid diagrams, requires `mermaid` and `dompurify`, `false` by default.
::::
:::
#code
```mdc
::field-group
:::field{name="componentDocs" type="boolean"}
Component docs such as ComponentProps and ComponentExample, `false` by default.
:::
:::field{name="mcp" type="boolean"}
Built-in MCP Server, required by AI Chat, `true` by default.
:::
::
## `Icon`
`icon` renders any [Iconify](https://icones.js.org/) icon, named `i-{collection}-{icon}`:
::code-preview
:icon{name="i-simple-icons-nuxtdotjs" class="size-6"} :icon{name="i-lucide-book-open" class="size-6"}
#code
```mdc
:icon{name="i-simple-icons-nuxtdotjs" class="size-6"} :icon{name="i-lucide-book-open" class="size-6"}
::
Kbd
kbd shows a keyboard key. meta renders as ⌘ on macOS and Ctrl elsewhere:
Press :kbd{value="meta"} :kbd{value="K"} to open search.
Code Blocks
Code blocks are highlighted with github-light / github-dark and support filenames, line highlights, a copy button, and color and icon previews. Use code-group, code-tree, code-preview and code-collapse for multi-file, multi-package-manager and long examples.
Images and Video
Insert remote or local images with Markdown image syntax, provide separate light and dark screenshots with `u-color-mode-image`, and embed videos with `:video`. Also covers where to put images and how to write alt text.