You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a few places in the docs where we imply or state that you can only use v-slot directly on the component tag for the default slot. So, for example, this isn't allowed:
Note that v-slot can only be added to a <template> (with one exception), unlike the deprecated slot attribute.
The Vue 3 guide isn't quite so explicit, but the slots guide gives no indication that this is supported. In the API reference it copies the wording from the Vue 2 docs:
Limited to [...] components (for a lone default slot with props)
The compiler does accept this form: <MyComponent #header>…</MyComponent> compiles to the same render function as the <template #header> form in Vue 3, 2.7 and 2.6, and vuejs/core has an on component named slot test for it. Could someone from the core team confirm whether this is intentional? If it is, the guide and the API reference could mention it; if not, it may be worth calling it deprecated. This came up in vuejs/eslint-plugin-vue#3192, where vue/valid-v-slot currently reports this form.
Activity
ValentinYoushkevich commentedon Oct 29, 2026
The compiler does accept this form:
<MyComponent #header>…</MyComponent>compiles to the same render function as the<template #header>form in Vue 3, 2.7 and 2.6, and vuejs/core has anon component named slottest for it. Could someone from the core team confirm whether this is intentional? If it is, the guide and the API reference could mention it; if not, it may be worth calling it deprecated. This came up in vuejs/eslint-plugin-vue#3192, wherevue/valid-v-slotcurrently reports this form.ValentinYoushkevich commentedon Nov 9, 2026
Opened #3491 to update the docs accordingly.