Actions
JS behaviour
Interests picker
Multi-select emoji chips in rows that drag sideways on touch; picking throws the emoji into the air and Clear shakes them off one after another.
Real scenarios
The component as it is used in a product — not a specimen grid.
Personalising a new account
The onboarding step that asks what you love: chips drag sideways on touch, picking throws the emoji, Clear shakes the picks off. The count follows the server.
2 picked on the server
A plain form, one row, a locked chip
No Livewire here: name makes the checkboxes post natively, rows=2 packs the chips tighter and one option ships disabled.
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| options | array | [] | Each option: value · label · emoji · disabled (or as a value => label map). |
| value | array | [] | The picked values; with wire:model the array binds to a Livewire property (initialise it as an array). |
| label | string | null | The fieldset legend above the chips. |
| rows | int | 3 | How many rows of chips; the options spread across them automatically. |
| clearLabel | string | 'Clear' | The Clear button’s label, with the pick counter beside it. |
Snippet
<x-nx::interests-picker label="به چی علاقه داری؟" wire:model.live="state.interests"
:value="$state['interests'] ?? ['design', 'food']"
:options="[
['value' => 'design', 'label' => 'طراحی', 'emoji' => '🎨'],
['value' => 'food', 'label' => 'غذا', 'emoji' => '🍜'],
]" />