Skip to content

zk-toast ​

A short message in a toast container.

Props ​

PropTypeDefaultDescription
variantstring'info'data-variant; warning and error have role="alert"
dismissiblebooltrueShows a close button (data-zk-dismiss=".toast", needs zk-scripts)
closeLabelstring'Close'Accessible name of the close button
classstring|nullnullCSS class(es) merged onto the root element

Undeclared attributes forward to the root element.

Slots ​

SlotDescription
defaultMessage

Class hooks: toast, toast-body, toast-close.

Examples ​

Basic ​

blade
<x-zk-toast variant="success">Saved.</x-zk-toast>

Documentation of 3.2.0 , built from c93e21f on 3.2.0 by pipeline #2919741884 on 2026-10-06.