ToastHost
The component that configures and renders toasts. Mount it once.
import { ToastHost } from 'react-native-super-toast';
<ToastHost position="top-center" theme="system" />;Toasts are drawn natively on both platforms; ToastHost supplies their defaults.
Props
Prop
Type
Offset
offset is measured from the safe area edge a toast is anchored to: down from the top for top-center toasts and up from the bottom for bottom-center toasts. center toasts ignore it.
Pass a number to use the same distance for both edges, or an object to set each edge. An omitted edge keeps the default: 8, or 16 when the device has no safe area inset on that edge.
<ToastHost offset={16} />
// Keep bottom toasts clear of a tab bar.
<ToastHost offset={{ top: 8, bottom: 80 }} />