---
title: "ComponentSlots"
description: "ComponentSlots automatically generates complete slot documentation for Vue components via nuxt-component-meta, displaying every slot's name, scoped variable types, and description in a single line of Markdown, greatly reducing the effort of writing API documentation by hand."
canonical_url: "https://docs.mhaibaraai.cn/en/docs/components/component-slots"
---
# ComponentSlots

> ComponentSlots automatically generates complete slot documentation for Vue components via nuxt-component-meta, displaying every slot's name, scoped variable types, and description in a single line of Markdown, greatly reducing the effort of writing API documentation by hand.

## Usage

Use the `:component-slots` syntax in your Markdown documentation:

```mdc
:component-slots{slug="TestApi"}
```

## API

### Props

```ts
/**
 * Props for the ComponentSlots component
 */
interface ComponentSlotsProps {
  /**
   * 获取组件插槽的 slug 标识
   * @default 路由路径的最后一段
   */
  slug?: string | undefined;
}
```

## Changelog

See commit history for [layer/app/components/content/ComponentSlots.vue](https://github.com/mhaibaraai/movk-nuxt-docs/commits/main/layer/app/components/content/ComponentSlots.vue).

---

- [GitHub](https://github.com/mhaibaraai/movk-nuxt-docs/blob/main/layer/app/components/content/ComponentSlots.vue)


## Sitemap

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