# Function toast

- toast(message: titleT, data?: ExternalToast): string | number

- #### Parameters

  - message: titleT
  - `Optional` data: ExternalToast

  #### Returns string | number

  - Defined in node_modules/.pnpm/sonner@2.0.7_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/sonner/dist/index.d.mts:130

#####
Index

### Properties

custom
dismiss
error
getHistory
getToasts
info
loading
message
promise
success
warning

##
Properties

### custom

custom: (
jsx: (id: string | number) => ReactElement,
data?: ExternalToast,
) => string | number

- Defined in node_modules/.pnpm/sonner@2.0.7_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/sonner/dist/index.d.mts:135

### dismiss

dismiss: (id?: string | number) => string | number

- Defined in node_modules/.pnpm/sonner@2.0.7_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/sonner/dist/index.d.mts:144

### error

error: (
message:
| undefined
| null
| string
| number
| boolean
| ReactElement
| Iterable<ReactNode>
| ReactPortal
| () => ReactNode,
data?: ExternalToast,
) => string | number

- Defined in node_modules/.pnpm/sonner@2.0.7_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/sonner/dist/index.d.mts:134

### getHistory

getHistory: () => (ToastT | ToastToDismiss)[]

- Defined in node_modules/.pnpm/sonner@2.0.7_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/sonner/dist/index.d.mts:147

### getToasts

getToasts: () => (ToastT | ToastToDismiss)[]

- Defined in node_modules/.pnpm/sonner@2.0.7_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/sonner/dist/index.d.mts:148

### info

info: (
message:
| undefined
| null
| string
| number
| boolean
| ReactElement
| Iterable<ReactNode>
| ReactPortal
| () => ReactNode,
data?: ExternalToast,
) => string | number

- Defined in node_modules/.pnpm/sonner@2.0.7_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/sonner/dist/index.d.mts:132

### loading

loading: (
message:
| undefined
| null
| string
| number
| boolean
| ReactElement
| Iterable<ReactNode>
| ReactPortal
| () => ReactNode,
data?: ExternalToast,
) => string | number

- Defined in node_modules/.pnpm/sonner@2.0.7_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/sonner/dist/index.d.mts:145

### message

message: (
message:
| undefined
| null
| string
| number
| boolean
| ReactElement
| Iterable<ReactNode>
| ReactPortal
| () => ReactNode,
data?: ExternalToast,
) => string | number

- Defined in node_modules/.pnpm/sonner@2.0.7_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/sonner/dist/index.d.mts:136

### promise

promise: <ToastData>(
promise: PromiseT<ToastData>,
data?: PromiseData<ToastData>,
) =>
| string & { unwrap: () => Promise<ToastData> }
| number & { unwrap: () => Promise<ToastData> }
| { unwrap: () => Promise<ToastData> }

- Defined in node_modules/.pnpm/sonner@2.0.7_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/sonner/dist/index.d.mts:137

### success

success: (
message:
| undefined
| null
| string
| number
| boolean
| ReactElement
| Iterable<ReactNode>
| ReactPortal
| () => ReactNode,
data?: ExternalToast,
) => string | number

- Defined in node_modules/.pnpm/sonner@2.0.7_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/sonner/dist/index.d.mts:131

### warning

warning: (
message:
| undefined
| null
| string
| number
| boolean
| ReactElement
| Iterable<ReactNode>
| ReactPortal
| () => ReactNode,
data?: ExternalToast,
) => string | number

- Defined in node_modules/.pnpm/sonner@2.0.7_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/sonner/dist/index.d.mts:133