"use client";
import { Toast } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
title | ReactNode | — | Title (any content). |
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). |
tone | Extract<Tone, "danger" | "info" | "success" | "warning"> | — | Colour role (neutral, primary, danger, success, warning, info). |
titleReactNode
Title (any content).
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).
toneExtract<Tone, "danger" | "info" | "success" | "warning">
Colour role (neutral, primary, danger, success, warning, info).
Other props are passed to the root element (HTMLAttributes<HTMLDivElement>), including className, style, id and aria-* attributes.
Exported
<Toast title="Exported" />