Super Toast

toast

The imperative API for showing, updating, and dismissing toasts.

import { toast, fontIcon } from 'react-native-super-toast';

Functions

SignatureDescription
toast(title: string, options?: ToastOptions): ToastIdShows a toast without an icon.
toast.success(title, options?)Success variant.
toast.error(title, options?)Error variant.
toast.warning(title, options?)Warning variant.
toast.info(title, options?)Info variant.
toast.loading(title, options?)Loading variant. Stays until updated or dismissed.
toast.promise<T>(value: Promise<T> | (() => Promise<T>), options: PromiseOptions<T>): ToastIdLoading toast that updates when the promise settles.
toast.dismiss(id?: ToastId): ToastId | undefinedDismisses one toast, or all toasts when id is omitted.
toast.wiggle(id: ToastId): voidWiggles a visible toast.
fontIcon(options: Omit<ToastFontIcon, 'type'>): ToastFontIconCreates a font glyph icon.

ToastOptions

Prop

Type

PromiseOptions

PromiseOptions<T> extends ToastOptions.

Prop

Type

On this page