Skip to main content

Slots

A slot is a named extension point owned by the component that renders it. ctx.slots.register(options, Component) returns a disposer. A registration can declare child slots; disposing it removes those children too.

Slot kindComposition
listMultiple entries
keyedEntries selected by key, such as a page route
singleOne active occupant, with a product fallback where provided

Admission

Any slot ending in .widget is a general widget host. Declaring cockpit.widget admits the widget to other widget zones, including zones supplied by third-party layouts. The user can move it without reinstalling the package.

Every other slot requires an exact declaration. A widget does not gain access to root, page, nav.item, settings.section or settings.missions. Declaring one settings group does not open other groups.

Registering in an undeclared or refused slot throws. The error identifies the requested surface and manifest slots.

Slot lifetime

Register a normal widget in cockpit.widget. Chat widget zones are declared only while the chat page is mounted; use placement to move a widget there. Do not assume every destination exists when your plugin first loads.

For layout authors, a name ending in .widget promises to accept general widgets. Use a different name for a region requiring a specialised component contract. Render the slots you declare using the platform Slot or SlotKeyed components.

Special surfaces

agents.view is keyed and requires exact admission. A registered view receives no props; the Agents shell retains its top bar, selector and widget zones. Use a stable key and release it when unloading.

kanban.column is a list slot rendered before status columns. It is not a widget destination or a new task status. Supply your own header and body; the host supplies column geometry, not task-drop handling. Create tasks through an explicit authorised operation instead of suggesting that dropping onto a decorative column changes a task's status.