Effects
JS behaviour
Dynamic island
A dark pill that morphs between compact and expanded states — notification, timer, call — springing its width, height and radius while the content cross-fades.
Real scenarios
The component as it is used in a product — not a specimen grid.
A phone’s live activities
Start a timer, take a call or get a delivery update. Tap the compact timer to expand it. The shape springs to each view while the content cross-fades.
Tea timer
05:00
Incoming call
Sara Novak
Your order is 2 stops away
Courier Marco · arriving 14:20
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| view | string | 'idle' | The active view's name; call show('name') inside, dispatch nx-island-show, or bind it with x-model. |
| island-view: name · size | string | — · 'compact' | Each view by name; expanded gets more padding and a minimum width. |
| label | string | 'Live activity' | Accessible name of the region. |
Snippet
<x-nx::dynamic-island view="idle" label="فعالیت زنده">
<x-nx::island-view name="idle">
<button class="nx-island-toggle" x-on:click="show('call')">…</button>
</x-nx::island-view>
<x-nx::island-view name="call" size="expanded">
<div class="nx-island-row">…</div>
<div class="nx-island-actions">
<button class="nx-island-btn" data-tone="danger" x-on:click="show('idle')">رد</button>
<button class="nx-island-btn" data-tone="success" wire:click="answer">پاسخ</button>
</div>
</x-nx::island-view>
</x-nx::dynamic-island>