Displays a brief notification above the page. Each top-level toast row creates one notification, and consecutive toasts at the same position are queued in a shared stack.
Ordinary notifications use role="status" and aria-live="polite". Colored variants retain a readable contrasting foreground. Automatic dismissal and the manual close control are configured independently.
Automatic dismissal delay in milliseconds. Defaults to 5000. Set to 0 to keep the toast visible until manually dismissed (when dismissible is true) or the page is left.
id attribute added to the container in HTML. It can be used to target this item through css or for scrolling to this item through links (use "#id" in link url).
Screen placement: top-start, top-center, top-end, bottom-start, bottom-center, or bottom-end. Defaults to top-end; invalid values safely fall back to that default.
Optional URL fragment that opens the toast without reloading the page, with or without the leading #. When set, the toast does not open on page load and can be opened repeatedly by a link or button whose target is that fragment. Multiple toasts can share a trigger to open as a stack.
select
'toast' as "component",
'toast-auto' as "id",
'This is a SQLPage toast' as "title",
'This toast will open automatically when the page loads.' as "description",
'check' as "icon",
'green' as "color";
Result
This is a SQLPage toast
This toast will open automatically when the page loads.
select
'toast' as "component",
'toast-dismissible' as "id",
'persistent-error' as "trigger",
'Could not save' as "title",
'Review the highlighted fields and try again.' as "description",
'alert-triangle' as "icon",
'black' as "color",
0 as "duration",
TRUE as "dismissible";
select
'toast' as "component",
'toast-nondismissible' as "id",
'persistent-status' as "trigger",
'Connection unavailable' as "title",
'This persistent notification has no manual close control.' as "description",
0 as "duration",
FALSE as "dismissible";
select
'button' as "component";
select
'Show dismissible error' as "title",
'#persistent-error' as "link",
'red' as "color";
select
'Show non-dismissible status' as "title",
'#persistent-status' as "link";
Result
Could not save
Review the highlighted fields and try again.
Connection unavailable
This persistent notification has no manual close control.
A persistent rich Markdown notification. Markdown takes precedence over plain text and renders emphasis and a link as HTML, while plain-text content remains escaped.
index.sql
select
'toast' as "component",
'toast-markdown' as "id",
'rich-notifications' as "trigger",
'Release available' as "title",
'<strong>This fallback stays escaped</strong>' as "description",
'Version **2.0** is ready. [Read the notes](https://example.com/releases).' as "description_md",
'blue' as "color",
0 as "duration";
select
'toast' as "component",
'toast-plain' as "id",
'rich-notifications' as "trigger",
'<strong>Plain text stays escaped</strong>' as "description",
'white' as "color",
0 as "duration";
select
'button' as "component";
select
'Show rich notifications' as "title",
'#rich-notifications' as "link";
Several persistent queued notifications. Toasts with the same position share a container and stack instead of overlapping.
index.sql
select
'toast' as "component",
'toast-stack-one' as "id",
'queued notifications' as "trigger",
'Import started' as "title",
'Preparing records.' as "description",
0 as "duration";
select
'toast' as "component",
'toast-stack-two' as "id",
'queued notifications' as "trigger",
'Import running' as "title",
'Processing records.' as "description",
0 as "duration";
select
'toast' as "component",
'toast-short' as "id",
'queued notifications' as "trigger",
'Temporary update' as "title",
'This message closes shortly.' as "description",
2000 as "duration";
select
'button' as "component";
select
'Show queued notifications' as "title",
'#queued notifications' as "link";
select
'toast' as "component",
'toast-bottom-center' as "id",
'bottom-notification' as "trigger",
'Download ready' as "title",
'Your export is ready.' as "description",
'bottom-center' as "position",
0 as "duration";
select
'button' as "component";
select
'Show bottom notification' as "title",
'#bottom-notification' as "link";