Skip to content
masterclass Buddy

Vue.js · Function

defineSlots

defineSlots() is a Vue <script setup> macro for typing slot names and slot props. It returns the component's slots object and takes no runtime arguments.

Last updated

Since
3.3

Syntax

defineSlots<TypeLiteral>()

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • useSlots()
  • <script setup>
  • setup context
  • slots

Source: <script setup>. Checked 2026-11-03.