Skip to main content

$getSlot

function

Returns the node occupying the named slot, or null if the slot is empty. Slots are a shadow-root-isolated channel kept separate from children; see $getSlotHost for the reverse up-link.

function $getSlot<T extends LexicalNode>(node: T, name: SlotName<T>): LexicalNode | null

Import

import { $getSlot } from '@modular/sdk/editor';