Base
JS behaviour
Toaster
The bottom-corner toast stack; six tones, descriptions and actions, hover-to-pause timers, swipe to dismiss.
Real scenarios
The component as it is used in a product — not a specimen grid.
Fire them yourself
Toasts stack up in the corner; hover them and the timers pause, swipe one away and it goes. The danger ones outstay the rest on purpose.
From the server side
The same stack, fed by Livewire: this button runs the slow action every demo here uses, and the toast is its receipt — description and all.
The one-liner you will actually write
One component in the layout, one call anywhere. That is the whole integration.
// layout — once
<x-nx::toaster />
// any Livewire component
$this->toast('پرداخت شد', 'فاکتور ۱۴۰۴ بسته شد', tone: 'success');
// any browser code
NabuXUI.toast.info('Maintenance at 02:00');
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| position | string | bottom-end | The corner it sits in — place it once in the layout. |
| toast() | method | — | From Livewire: $this->toast('Saved', tone: 'success'); from the browser: $nxToast() or NabuXUI.toast(). |
Snippet
{{-- Livewire — داخل کامپوننت --}}
$this->toast('پرداخت شد', 'فاکتور ارسال شد', tone: 'success');
{{-- Blade — یک بار در layout --}}
<x-nx::toaster />