Menus & navigation JS behaviour

Dock panels

A dock that grows itself into the activated item’s panel; Escape or a press outside folds it back.

Real scenarios

The component as it is used in a product — not a specimen grid.

Quick panels for the daily tools

The dock itself becomes the panel — press an item, then Escape or click outside to fold it back. Arrow keys walk the items.

Open panel on the server: null

Important props

Important props
Prop Type Default What it does
items array [] Each item: id, label and icon; the content comes from the slot named after the id or its content key.
value / wire:model string null The open panel’s id; null when closed — bindable with wire:model.
label string «داک» The toolbar’s accessible label.

Snippet

<x-nx::dock-panels label="پنل‌های سریع" :value="$state['dock'] ?? null" wire:model.live="state.dock" :items="[
    ['id' => 'player', 'label' => 'در حال پخش', 'icon' => 'play'],
    ['id' => 'inbox', 'label' => 'صندوق', 'icon' => 'mail'],
]">
    <x-slot:player>…</x-slot:player>
    <x-slot:inbox>…</x-slot:inbox>
</x-nx::dock-panels>