---
title: "MDC Components"
description: "Use MDC to add Nuxt UI callouts, cards, tabs, and other prose components to Markdown."
canonical_url: "https://docs.mhaibaraai.me/en/docs/writing/mdc-components"
---
# MDC Components

> Use MDC to add Nuxt UI callouts, cards, tabs, and other prose components to Markdown.

[MDC syntax](https://content.nuxt.com/docs/files/markdown#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.

> [!NOTE]
> See: https://ui.nuxt.com/docs/typography
> 
> This page covers the prose components most useful in docs. Any globally registered Vue component works in Markdown the same way; see the Nuxt UI docs for the full list.

## `Callout`

Callouts highlight information that sits alongside the main text. `note`, `tip`, `warning` and `caution` are shortcuts with a preset icon and color:

> [!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.

```mdc
  ::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`](https://nuxt.com/docs/api/components/nuxt-link) props, and with `to` the whole callout becomes clickable:

```mdc
::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:

```mdc
::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:

```mdc
::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:

**Q: 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

.

**Q: Does changing app.config.ts need a restart?**

No. 

app.config.ts

 is read at runtime and hot-reloads in the dev server.

**Q: How do I turn off the GitHub integration?**

Set 

github: false

 in 

app/app.config.ts

.

```mdc
  ::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:

```mdc
::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:

````mdc
::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

`````bash [Terminal]
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

```bash [Terminal]
cd my-docs && pnpm dev
```

\::

````text
:::
::

::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.
:::
````

````text
::

## `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:

```mdc
Press :kbd{value="meta"} :kbd{value="K"} to open search.
```


## Sitemap

See the full [sitemap](https://docs.mhaibaraai.me/sitemap.md) for all pages.
