Toast
Show temporary status messages through solid-toaster integration.
Use solid-toaster for temporary status messages. It is a separate package; Moraine does not
export a Toast component. Mount its host once and use Moraine icons and theme variables to match
your application.
Basic usage#
Playground#
Usage#
Install and mount the host#
Install solid-toaster:
Import solid-toaster/style.css and mount one BaseToaster at your application root before
calling toast methods. Its icons and style props connect the host to Moraine’s semantic
icons and theme variables, as shown in Basic usage.
Calls and lifecycles#
Use semantic toast calls for immediate feedback and toast.promise for a promise whose pending, success, and error states need distinct messages. Duration and scoped instances are supplied to the toaster integration.
Duplicate messages#
Set preventDuplicate on the host to avoid showing repeated toasts with the same content.