Skip to main content

Signature

toast.info(
  title: string,
  descriptionOrOptions?: string | ToastOptions,
  duration?: number
): void

Parameters

title
string
required
The toast title
descriptionOrOptions
string | ToastOptions
Description string OR options object with description, duration, icon, style, etc.
duration
number
Duration in milliseconds (default: 4000). Ignored if options object is passed as second parameter.

Toast options

When passing an options object as the second parameter, the following properties are available:
id
string
Stable key for deduplication. When set, toasts with the same id deduplicate and update the existing toast’s content.
description
string
Description text
duration
number
Duration in milliseconds (overrides default)
icon
ReactNode | IconRenderFn
Custom icon (ReactNode or render function)
style
ViewStyle
Style overrides for this toast’s container
titleStyle
TextStyle
Style overrides for this toast’s title
descriptionStyle
TextStyle
Style overrides for this toast’s description
dismissible
boolean
Whether this toast can be dismissed via swipe (overrides config)
showCloseButton
boolean
Whether to show the close button on this toast (overrides config)
deduplication
boolean
Enable deduplication for this toast (overrides global config). Plays a pulse animation for non-error toasts or a shake for errors.

Examples

Simple usage

toast.info("Tip", "Swipe up to dismiss");

With duration

toast.info("Tip", "Swipe up to dismiss", 5000);

With options object

toast.info("Tip", {
  description: "Swipe up to dismiss",
  style: { backgroundColor: '#f0f9ff' },
});

With custom icon

import { Info } from 'lucide-react-native';

toast.info("New feature", {
  description: "Check out the new settings panel",
  icon: <Info size={24} />,
});

Welcome message

toast.info("Welcome back!", {
  description: "You have 3 new messages",
  duration: 6000,
  style: {
    paddingVertical: 16,
  },
});

Update notification

toast.info("Update available", {
  description: "Version 2.0 is ready to install",
  duration: 8000,
  showCloseButton: true,
});

Quick tip

toast.info("Pro tip", {
  description: "Double-tap to like",
  duration: 3000,
  style: {
    borderLeftWidth: 4,
    borderLeftColor: '#3b82f6',
  },
});

Build docs developers (and LLMs) love