Component docs
Loading
import { Notification } from "@pixxl-tools/components";
// In Server Components:
import { Notification } from "@pixxl-tools/components/server";| Prop | Type | Default | Description |
|---|---|---|---|
title | ReactNode | — | Title (any content). |
tone | Extract<Tone, "danger" | "info" | "success" | "warning"> | — | Colour role (neutral, primary, danger, success, warning, info). |
actions | ReactNode | — | Action slot (buttons or links). |
closeLabel | string | from the message catalog | Accessible name of the close button (default from the message catalog). |
icon | FeedbackIcon | — | Leading icon. Default: the tone icon; false hides it. |
live | FeedbackLive | true | Announce through the toast's own live role (default true; danger uses role="alert"). ToastProvider sets false and announces through persistent live regions instead. |
onClose | () => void | — | Called when the user dismisses it (close button, Escape, outside press). |
titleReactNode
Title (any content).
toneExtract<Tone, "danger" | "info" | "success" | "warning">
Colour role (neutral, primary, danger, success, warning, info).
actionsReactNode
Action slot (buttons or links).
closeLabeldefault from the message catalogstring
Accessible name of the close button (default from the message catalog).
iconFeedbackIcon
Leading icon. Default: the tone icon; false hides it.
livedefault trueFeedbackLive
Announce through the toast's own live role (default true; danger uses role="alert"). ToastProvider sets false and announces through persistent live regions instead.
onClose() => void
Called when the user dismisses it (close button, Escape, outside press).
Synced
<Notification title="Synced" tone="success" />