The <luna-toast> and <luna-toast-stack> components display temporary notification messages using a JavaScript API.
Paths
/lunadom/components/toast/toast.js /lunadom/components/toast-stack/toast-stack.js Toast Variants
Different notification types with auto-dismiss.
Toast Options
Closable and persistent toasts.
Customization
luna-toast
default - Content of the toast message.luna-toast-stack
default - Container for toast messages.luna-toast
variant - Toast variant (info, success, warning, danger). Defaults to 'info'.duration - Auto-dismiss duration in milliseconds. Set to 0 to never auto-dismiss.luna-toast
--luna-radius - Border radius of toast. Defaults to 0.5rem.--luna-bg - Background color (set automatically by variant).--luna-color - Text color (set automatically by variant).--luna-border - Border color (set automatically by variant).luna-toast
dismiss() - Programmatically dismiss the toast.luna-toast-stack
show(message, options) - Show a toast with the given message and options.Luna.toast(message, options) - Global helper function to show toasts.luna-toast
luna-dismiss - Fired when toast is dismissed (bubbles, composed).