Effects
JS behaviour
Goo stack
Pills that melt into one liquid shape at rest and split apart on hover or focus; a new pill buds off the top. The goo filter runs on a layer of shapes, the text stays crisp on its own layer.
Real scenarios
The component as it is used in a product — not a specimen grid.
Notification tray
At rest the pills melt into one shape; hover or tab into it and they split apart. New notifications bud off the top, dismissed ones pinch away.
Upload queue, pinned open
state="split" keeps the pills apart; dismiss one and watch its neighbours flow together through the gap.
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| items | array | [] | Each item: id, label and an optional icon. Add more later with add({ label, icon }) or the nx-goo-add event. |
| state | string | 'auto' | auto (melted at rest, split on hover) · merged · split. |
| strength | number | 8 | Blur radius of the goo; more melts pills from further apart. |
| icons | array | [] | Icon names that pills added later may use. |
| label · dismiss-label | string | null · 'Dismiss' | Accessible names of the list and of each pill’s dismiss button. |
Snippet
<div x-data x-on:nx-goo-dismiss="$wire.markRead($event.detail.id)">
<x-nx::goo-stack label="اعلانها" :icons="['bell']" :items="[
['id' => 'pay-1042', 'label' => 'فاکتور ۱۰۴۲ پرداخت شد', 'icon' => 'check-circle'],
['id' => 'cmt-77', 'label' => 'سارا روی نقشهٔ راه نظر داد', 'icon' => 'message'],
]" />
</div>
<x-nx::button x-data x-on:click="$dispatch('nx-goo-add', { label: 'یادآوری جلسه', icon: 'bell' })">افزودن</x-nx::button>