Vue · VUE0036
Review components with a large prop surface
Reports Vue components that declare more props than the maxProps option allows (default 12), counting props the way Vue compiles them: type-based defineProps with extended interfaces and imported types, runtime declarations, defineModel, and the Options API props option. Files whose prop types Vue cannot resolve, or whose runtime declaration spreads a shared object, are skipped instead of undercounted. Strict Preset only.
Run this rule
pnpm vite-doctor . --framework vue --extends auto,vue/strict --rules vue/component/max-props
Why it matters
A large prop surface is a review signal, not a defect. It often means the component relays most of its props to one child, or holds several responsibilities behind one tag. The vuejs-ai vue-best-practices skill treats API size as a review signal rather than an extraction threshold, so this rule is opt-in.
Recommended fix
Check whether most props are forwarded to a single child; if so, let parents use that child directly or pass it through a slot. Otherwise split the component by responsibility, or turn content-shaped props such as labels, icons and render variants into slots. Do not group unrelated props into one object prop; the contract stays the same size. Raise maxProps when the surface is intentional, such as a design-system primitive.
Useful links
Example
Pass content through slots instead of relaying props
Before
<script setup lang="ts">
defineProps<{
title: string
subtitle?: string
icon?: string
iconColor?: string
badge?: string
badgeColor?: string
actionLabel?: string
actionIcon?: string
actionTo?: string
actionVariant?: string
footerText?: string
footerLink?: string
dense?: boolean
}>()
</script>
After
<script setup lang="ts">
defineProps<{
title: string
dense?: boolean
}>()
</script>
<template>
<section>
<header>{{ title }} <slot name="badge" /></header>
<slot />
<footer><slot name="actions" /></footer>
</section>
</template>