slot

A place in a component's layout that the consumer fills with their own content, either through a named prop such as icon or through a Slot component.

In more detail

Named slot props like leadingIcon or trailingAction give structure to layouts with fixed zones, such as a dialog header and footer. Radix's Slot component is a different use of the word: it merges a component's props onto its single child element, which powers the asChild pattern.

Example

<Layout top={<h1>App</h1>} main={<p>Content</p>} />

Related terms

Taught in

References