Cosmos Components include some toasts out of the box.
toast
object’s methods:
cosmos-toast
component with your own custom element, ortoast
object.toast.errorlink
toast. It takes & a short message and
produces a toast with a link to spawn an error modal with the formatted error details.
cosmos-toast
componentcosmos-toast
component with your own custom element.
cosmos-toast
and customize them to your liking.
Toasts come in 4 variant
s:
info
success
warning
error
lifespan
.
toast
methodstoast
object allows you
to replace the methods with your own custom ones. This allows you to integrate the Cosmos Components
with your own frontend framework. The info
, success
, warning
, and error
methods internally
call the toast.show
method with the appropriate variant.