Skip to main content
Version: 1.x

use-toast

useToast()

The useToast hook provides methods to show and manage toast notifications.

const {
sounds,
showToast,
removeToast,
removeToastAll,
} = useToast();

Methods

MethodDescription
soundsAvailable sound presets ( success, error, info, warning )
showToast(options)Shows a toast and returns its id
removeToast(id)Removes a toast by ID
removeToastAll()Clears all active toasts