Interface ToasterProviderProps

interface ToasterProviderProps {
    children?: ReactNode;
    className?: string;
    closeButton?: boolean;
    containerAriaLabel?: string;
    dir?: "auto" | "ltr" | "rtl";
    duration?: number;
    expand?: boolean;
    gap?: number;
    hotkey?: string[];
    icons?: ToastIcons;
    id?: string;
    invert?: boolean;
    key?: null | Key;
    mobileOffset?: Offset;
    offset?: Offset;
    position?: Position;
    ref?: LegacyRef<HTMLElement>;
    richColors?: boolean;
    style?: CSSProperties;
    swipeDirections?: SwipeDirection[];
    theme?: "dark" | "light" | "system";
    toastOptions?: ToastOptions;
    visibleToasts?: number;
}

Hierarchy

  • SonnerToasterProps
    • ToasterProviderProps

Properties

children?: ReactNode
className?: string
closeButton?: boolean
containerAriaLabel?: string
dir?: "auto" | "ltr" | "rtl"
duration?: number
expand?: boolean
gap?: number
hotkey?: string[]
icons?: ToastIcons
id?: string
invert?: boolean
key?: null | Key
mobileOffset?: Offset
offset?: Offset
position?: Position
ref?: LegacyRef<HTMLElement>

Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref).

richColors?: boolean
style?: CSSProperties
swipeDirections?: SwipeDirection[]
theme?: "dark" | "light" | "system"
toastOptions?: ToastOptions
visibleToasts?: number