Imperative toast API backed by a lazily-created document-level region (or a [data-hl-toast-region] you render yourself, e.g. via <ToastRegion>). Safe to call from anywhere, no setup required:
[data-hl-toast-region]
<ToastRegion>
import { useToast } from '@hydrateless/svelte';const toast = useToast();toast.show('Saved', { variant: 'success' }); Copy
import { useToast } from '@hydrateless/svelte';const toast = useToast();toast.show('Saved', { variant: 'success' });
Optional
Imperative toast API backed by a lazily-created document-level region (or a
[data-hl-toast-region]you render yourself, e.g. via<ToastRegion>). Safe to call from anywhere, no setup required: