Actions
JS behaviour
Metal button
A liquid-metal toggle (aria-pressed): pressed, the rim turns iridescent and the icon swaps for active-icon (live wave bars by default).
Real scenarios
The component as it is used in a product — not a specimen grid.
A voice bar in chat
Press the mic: the rim turns iridescent and the icon becomes live wave bars — it is a real aria-pressed toggle, not a visual trick.
Bound to Livewire
wire:model.live keeps the server in step, and every press dispatches nx-change too.
idle
Pinned on
A pill can ship already pressed — the "on air" state of a room, held for the session.
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| label | string | '' | The button’s label; its title/tooltip when round, and inline text when pill. |
| icon / activeIcon | string | 'mic' / null | The off and on icons; without active-icon the live wave bars show. |
| shape | string | 'round' | round (icon alone) or pill (icon + label). |
| pressed | bool | false | The initial state; with wire:model it follows the Livewire property and also dispatches nx-change. |
Snippet
<x-nx::metal-button label="ورودی صدا" wire:model.live="state.mic" />