Toast Variants
success
Use for completed actions and positive outcomes.
toast.success('Changes saved');error
Use for failures that need user awareness.
toast.error('Could not save changes');info
Use for neutral updates and status messages.
toast.info('Sync started in background');loading
Use for long-running actions. Loading toasts default to infinite duration until transitioned or dismissed.
const id = toast.loading('Importing contacts...');
// Latertoast.update(id, { variant: 'success', message: 'Import complete', duration: 'short' });Variant selection rules of thumb
- Prefer
successfor finished, user-triggered operations. - Prefer
errorfor operations that failed and may need follow-up. - Prefer
infofor passive state changes. - Prefer
loadingwhen you expect a later completion state.