nalarx-ui
Components

Alert

An inline notice in a neutral box; the leading icon carries the tone.

bunx shadcn@latest add @nalarx/alert

Usage

role stays with you: a static hint has none, a failed save gets role="alert".

<Alert tone="err" role="alert">
  <Icon name="alert-triangle" />
  <AlertTitle>Could not save the agent</AlertTitle>
  <AlertDescription>Check the connection and try again.</AlertDescription>
</Alert>
Neutral
Changes apply to new conversations.
Connected
Odoo syncs every hour.
Slow connection
The last sync took 12 minutes.
Without an icon, the text spans the box.
Neutral
Changes apply to new conversations.
Connected
Odoo syncs every hour.
Slow connection
The last sync took 12 minutes.
Without an icon, the text spans the box.

Props

Alert takes every div attribute plus tone ("neutral" | "ok" | "warn" | "err", default "neutral"). AlertTitle and AlertDescription are divs.

Replaces

The Platform's base/Alert.tsx (tinted boxes become neutral boxes).

On this page