ComponentProps

ComponentProps automatically reads Vue component metadata via nuxt-component-meta, generating a complete Props documentation table in a single line of Markdown that includes property names, types, default values, and descriptions, with support for specifying the target component name via the slug property.

Usage

Use the :component-props syntax in your Markdown documentation:

Prop Default Type
color'primary'"error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral"
size'md'"xs" | "sm" | "md" | "lg" | "xl"
variant'solid'"link" | "solid" | "outline" | "soft" | "subtle" | "ghost"

The variant of the component

labelstring
avatar{ src: string; alt?: string; text?: string; chip?: boolean | "circle"; size?: "xs" | "sm" | "md" | "lg" | "xl"; }

display an avatar

disabledboolean
:component-props{slug="TestApi"}

API

Props

Prop Default Type
ignore[ "activeClass", "inactiveClass", "exactActiveClass", "ariaCurrentValue", "href", "rel", "noRel", "prefetch", "prefetchOn", "noPrefetch", "prefetchedClass", "replace", "exact", "exactQuery", "exactHash", "external", "onClick", "viewTransition", "enterKeyHint", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget" ]string[]

需要忽略的属性名数组

slug路由路径的最后一段string

获取组件属性的 slug 标识

proseboolean

Changelog

No recent changes
Copyright © 2024 - 2026