R
fn

renderSlotChild

Renders a single child from the provided default slot, applying attrs to it. Shared between `<Slot>` and `<Primitive as="template">`.

Signature

ts
export function renderSlotChild(slots: Slots, attrs: Record<string, unknown>): VNode | null{ ... }

Parameters

ParameterTypeDescription
slotsReadonly<{ [name: string]: import("vue").Slot<any> | undefined; }>Component slots
attrsRecord<string, unknown>Attrs to apply to the slotted child

Returns

VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any; }> | nullCloned VNode with merged attrs or null