Skip to content

Toast

The Toast API displays a non-disruptive message that appears in one of the four edges of the screen of the interface to provide quick and short feedback on the outcome of an action

Show method

The toast.show method is used to show a notification (Toast) in the Seller Area. You can customize its behavior by providing different options.

ts
qantra.toast.show({
  title: 'This is a toast 🍞',
  description: 'Settings saved successfully',
});

Options

  • title: string
  • description: string
  • position: top-left | top-right | bottom-left | bottom-right
  • type: info | success | warning | error
  • canClose: boolean
  • closeAfterDuration: number

Example

ts
qantra.toast.show({
  title: 'Settings updated',
  description: 'User preferences have been updated successfully',
  position: 'bottom-left',
  type: 'success',
  canClose: false,
  closeAfterDuration: 2000,
});

Toast