Category

List of articles for category: "Slots"
Vue Tip: Check if Slot Is Empty Image

Vue Tip: Check if Slot Is Empty

You can check if a slot is empty, for example, only to render it if it has content.
Vue Tip: Expose Slots From a Child Component  Image

Vue Tip: Expose Slots From a Child Component

Third-party components are often wrapped in a custom component.
Vue Tip: Passing Slots to Child Components Image

Vue Tip: Passing Slots to Child Components

In certain scenarios, you need to pass on all slots from a parent component to the child component.
Vue Tip: Use Scoped Slots in a Child Component to Provide Data for Parent Component Image

Vue Tip: Use Scoped Slots in a Child Component to Provide Data for Parent Component

A Scoped Slot in a child component can provide data for presentation in the parent component using a slot.
Vue Tip: Watch Slot Changes Image

Vue Tip: Watch Slot Changes

You can use the MutationObserver API to react to changes in the slot content.