scoped slots
A Vue scoped slot lets a child provide data to caller-supplied content.
Use this when A reusable table needs different cell markup on different pages.
without the term
“We need the same sortable table on two pages but the cells should look different on each. Can I customize the cells without copying the whole table component?”
with the term · How do you ask a model for scoped slots?
Use scoped slots for these table cells. Verify two presentations share sorting and selection without mutating the table’s internal state through the slot.
What is scoped slots?
The child component passes its data to a slot, and the parent decides how to render it, so the child keeps its behavior while each caller controls the markup.
Why does scoped slots matter when vibe coding?
Copying the table to customize one cell duplicates sorting and selection behavior.
How do you do scoped slots?
Expose the smallest useful slot data and verify multiple renderings of the same behavior.
What goes wrong with scoped slots?
Exposing unrestricted mutable internals as the customization API.