Vue slots let a parent pass template content into a child
Answer: Components can accept props, but they can also accept template content. A parent may pass a template fragment to a child, and the child renders that fragment in its own template.
Outlets
The <slot> element is a slot outlet: the place where the parent-provided slot content is rendered.
Runtime
In runtime-core, the slots object tracks the slot owner instance (attached during normalizeChildren when the component vnode is created). Compiler-generated slots also carry an optimization hint on the slots object itself. When default slot content is not a function, Vue warns and still normalizes it onto instance.slots.default.
See also
Claims
- id: C1 claim: A slot element is an outlet for parent-provided content. source: S1 evidence: "The
<slot>element is a slot outlet that indicates where"
- id: C2 claim: A parent can pass a template fragment to a child component. source: S1 evidence: "we may want to pass a template fragment to a child component,"
- id: C3 claim: Runtime-core tracks the slot owner instance on the slots object. source: S2 evidence: "for tracking slot owner instance. This is attached during"
- id: C4 claim: Non-function default slot content is normalized onto instance.slots.default. source: S2 evidence: "instance.slots.default = () => normalized"
Sources
- [S1] Slots. Vue.js docs. https://vuejs.org/guide/components/slots.html . License: CC BY 4.0. Accessed 2026-11-10.
- [S2] runtime-core componentSlots. Vue.js core source. https://github.com/vuejs/core/blob/main/packages/runtime-core/src/componentSlots.ts . License: MIT. Accessed 2026-11-10.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources and notices: Vue.js documentation (vuejs/docs): Copyright (c) 2019-present, Yuxi (Evan) You and Vue documentation contributors; CC BY 4.0, text only (https://raw.githubusercontent.com/vuejs/docs/main/LICENSE). Vue.js core (vuejs/core): Copyright (c) 2018-present, Yuxi (Evan) You and Vue contributors; MIT (https://raw.githubusercontent.com/vuejs/core/main/LICENSE). Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Vue.js docs, Slots, CC BY 4.0, text only (vuejs/docs); Vue.js core, runtime-core componentSlots, MIT (vuejs/core). Notices: Vue.js documentation (vuejs/docs): Copyright (c) 2019-present, Yuxi (Evan) You and Vue documentation contributors; CC BY 4.0, text only (https://raw.githubusercontent.com/vuejs/docs/main/LICENSE). Vue.js core (vuejs/core): Copyright (c) 2018-present, Yuxi (Evan) You and Vue contributors; MIT (https://raw.githubusercontent.com/vuejs/core/main/LICENSE).
Cite this
iinventedlight. 2026. "Vue slots let a parent pass template content into a child." iinventedlight Library, iil:note:2n40k3d6, version of 2026-11-10. https://iinventedlight.com/library/notes/vue-slots/. License: CC-BY-4.0.
@misc{iil_note_2n40k3d6,
author = {{iinventedlight}},
title = {{Vue slots let a parent pass template content into a child}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-10},
url = {https://iinventedlight.com/library/notes/vue-slots/},
note = {Permanent ID iil:note:2n40k3d6. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/vue-slots.md.