Base JS behaviour

Alert

The page-level message with icon, title, description, an actions slot and a dismiss — from quota warnings to maintenance notices.

Real scenarios

The component as it is used in a product — not a specimen grid.

The top of the billing page

Loudest first, each with its own job: warn with a way out, inform with a date, reassure with a receipt.

This workspace is at 91% of its storage

2.7 GB left of 30 GB. Old teasers alone eat 9 GB.
See plans

Maintenance this Thursday, 02:00–02:20

API stays up; deploys queue and run after.

Invoice 1404 was paid

48,260,000 Toman charged to the card ending 1404.

Tones and silences

Every tone picks its own icon; icon=false removes it when the words are enough.

Draft autosaved.
Nabu 5 shipped — 34 fixes.

The crawler lost its token

Reconnect it from Settings → Integrations.

Solid variant for the win wall

variant="solid" for moments that must not be missed — the trial’s last day.

Last day of your Pro trial

Tonight the gold features pause — the shop stays open.

Important props

Important props
Prop Type Default What it does
tone string info neutral · accent · success · warning · danger · info.
title string null The bold lead; body copy goes in the slot.
actions slot — The action row at the alert’s end.
dismissible bool false A close button with an exit animation.

Snippet

<x-nx::alert tone="warning" title="سقف مصرف نزدیک است" dismissible>
    ۸۰٪ از ۵ گیگابایت مصرف شده است.
    <x-slot:actions>
        <x-nx::button size="sm" variant="secondary">ارتقا</x-nx::button>
    </x-slot:actions>
</x-nx::alert>