v-slot (#) Slot Content Directive

Last updated: 2026-10-22

v-slot (#) Slot Content Directive

v-slot declares slot content, shorthand #. It passes template fragments into a child component's named or scoped slots.

GroupDirectives
KindDirective
ScopeTemplate
Vue Version3.0+
SSR SupportYes

📝 Syntax

<template v-slot:header>...</template>
<template #default="{ item }">...</template>
<Child v-slot="{ data }">

⚙️ Arguments

expressionSlot name (omitted for the default slot); scoped slots destructure child-provided data

Returns:Directive, no return value

▶ Example

Edit the code below and see the live result:

Output:

The page shows a bold 'Custom header' — parent content replaced the slot default.

💡 Key Points

💡 Tip # is shorthand for v-slot: — #header equals v-slot:header.
⚠️ Warning v-slot works only on