Toast
OrganismNotification system with success/warning/error/info/loading variants. Hover-to-freeze, progress bar, title, actions, and promise support.
File uploaded
report.pdf has been uploaded successfully.
<%- include('modules/ui/Toast', {
variant: 'success',
title: 'File uploaded',
message: 'report.pdf has been uploaded successfully.'
}) %>
Upload failed
The file exceeds the 10 MB size limit.
<%- include('modules/ui/Toast', {
variant: 'error',
title: 'Upload failed',
message: 'The file exceeds the 10 MB size limit.',
actionLabel: 'Try again'
}) %>
Session expires in 5 minutes.
<%- include('modules/ui/Toast', {
variant: 'warning',
message: 'Session expires in 5 minutes.'
}) %>
New update
Version 2.4 is available. Refresh to apply.
<%- include('modules/ui/Toast', {
variant: 'info',
title: 'New update',
message: 'Version 2.4 is available. Refresh to apply.'
}) %>
Saving your changes…
<%- include('modules/ui/Toast', {
variant: 'loading',
message: 'Saving your changes…',
persistent: true
}) %>
Kullanıcı yükleniyor…
<%# Mount once — store.js exposes window.toast() %>
<%- include('modules/ui/Toast/scripts/store.js') %>
<%# modules/ui/Toast/Toast.ejs %>
<%#
Toast suite entry point.
Renders a single server-side toast card (`partials/_toast-item.ejs`) and
initialises the global `window.toast()` / `window.notify()` controller
exactly once per page (`scripts/store.js`). Safe to include this partial
multiple times — the controller IIFE no-ops on re-init.
Locals (all optional unless noted):
variant 'info' (default) | 'success' | 'warning' | 'error' | 'loading'
title string
message string
actionLabel string
actionHref string
persistent bool — hides the close × button
position string — unused for the server card; reserved for future use
M1 milestone — see PLANS/26-Toast.md.
%>
<%- include('./partials/_toast-item.ejs', locals) %>
<%- include('./scripts/store.js') %>