Access the imperative toast API: show(message, { duration, intent }) returns the toast element, dismiss(toast) removes it. Works with or without a mounted ToastRegion.
show(message, { duration, intent })
dismiss(toast)
const toast = useToast();toast.show('Saved', { intent: 'success' }); Copy
const toast = useToast();toast.show('Saved', { intent: 'success' });
Access the imperative toast API:
show(message, { duration, intent })returns the toast element,dismiss(toast)removes it. Works with or without a mounted ToastRegion.