Menus & navigation
JS behaviour
Morph menu
A filter button that grows into its own multi-select list; the selection count rolls in the page’s digits and “clear” resets it.
Real scenarios
The component as it is used in a product — not a specimen grid.
Filter the candidate pool
The button’s own container becomes the checklist; the count rolls as you tick, “clear” empties it, and the pool below refilters on the server with every change.
6 of 6 candidates match:
Ava Karimi
Soheil Nouri
Mona Fischer
Kian Rajaee
Sara Mohammadi
Nima Farhadi
Growing upward: labels on a note
side="top" grows the list upward — handy at the bottom of a composer, above a toolbar.
Bound to Livewire:
[]
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| options | array | [] | Each option: value, label, icon and disabled; the checkboxes are native and post as name[]. |
| value / wire:model | array | [] | The chosen values; wire:model sits on the checkboxes themselves and survives the morph. |
| label / icon | string | «فیلتر» · sliders | The trigger’s text and icon. |
| side | string | bottom | Which way it grows: bottom or top. |
Snippet
<x-nx::morph-menu label="دپارتمان" name="teams" :value="$state['teams'] ?? []"
wire:model.live="state.teams" :options="[
['value' => 'design', 'label' => 'طراحی', 'icon' => 'edit'],
['value' => 'backend', 'label' => 'بکاند', 'icon' => 'cpu'],
['value' => 'support', 'label' => 'پشتیبانی', 'icon' => 'message'],
]" />