Toast

Auto-dismissing slide-in notifications with stacking and color variants.

Default

// Default toast (auto-dismisses after 4s)
SoftUI.toast({
  title: 'Notification',
  message: 'This is a default toast message.'
});

// Persistent toast (no auto-dismiss)
SoftUI.toast({
  title: 'No auto-close',
  message: 'This toast stays until you dismiss it.',
  duration: 0
});

Variants

SoftUI.toast({
  title: 'Success',
  message: 'Your changes have been saved.',
  variant: 'success'
});

SoftUI.toast({
  title: 'Error',
  message: 'Something went wrong.',
  variant: 'danger'
});

SoftUI.toast({
  title: 'Warning',
  message: 'Your session will expire soon.',
  variant: 'warning'
});

SoftUI.toast({
  title: 'Info',
  message: 'A new version is available.',
  variant: 'info'
});

Positions

// Position options: 'tr', 'tl', 'br', 'bl', 'tc', 'bc'
SoftUI.toast({
  title: 'Top Left',
  message: 'Slides in from the left.',
  position: 'tl'
});

SoftUI.toast({
  title: 'Top Center',
  message: 'Centered at the top.',
  position: 'tc'
});

// Options:
// title    — bold heading text
// message  — body text
// variant  — 'success', 'danger', 'warning', 'info'
// duration — ms before auto-dismiss (default 4000, 0 = persistent)
// position — 'tr', 'tl', 'br', 'bl', 'tc', 'bc' (default 'tr')
// closable — show close button (default true)

Delete this item?

This action cannot be undone. This will permanently delete the item and remove all associated data.