Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Vue 3 v-slot Directive

Vue 3 v-slot Directive

Vue3 Built-in Directives Vue 3 Built-in Directives


v-slot The directive is used to represent named or scoped slots, for content distribution between components.


Basic Explanation

v-slot The directive is used to provide content for slots or receive props passed by slots. It is the core way to achieve component content distribution in Vue.


Basic Usage

1. Named Slots

Example

2. Shorthand Form

Example