Menus & navigation
JS behaviour
Audio room
A live pill that opens like a dynamic island; speakers and listener count come from the render, so Livewire refreshes them through the morph.
Real scenarios
The component as it is used in a product — not a specimen grid.
The live room pill
Press the pill: it grows into the room. Mute, raise a hand, leave — each control dispatches its event; we toast what you did.
Starting open, like a host
open="true" renders the room expanded, with your own count rolled in Persian digits: 312
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| title | string | — | The room’s name — on the pill and the panel. |
| members | array | [] | Each member: name, role, speaking, muted and avatar. |
| listeners | int | 0 | The listener count; rolls in the page’s digits. |
| events | — | — | nx-room-mute, nx-room-hand and nx-room-leave fire from the panel’s buttons. |
Snippet
<x-nx::audio-room title="پشتیبانی زنده" :listeners="1284" x-on:nx-room-leave="$wire.ping('از اتاق خارج شدید')" :members="[
['name' => 'آوا کریمی', 'role' => 'میزبان', 'speaking' => true],
['name' => 'سهیل نوری', 'muted' => true],
]" />