1. framework components
  2. toast

Toast

Display brief messages to users.

Usage

This component acts as a Singleton - meaning you only implement a single instance (typically at the root scope of your app) and then reuse it over and over. To do this, implement the <Toast.Group> at the root scope of your app (the root layout), and use a shared createToaster() instance to trigger messages to that group from anywhere in your application.

Type

Placement

Action

Closable

Meta

Promise

API Reference

Root

Property Default Type
toast -
Options<any>
element -
Snippet<[HTMLAttributes<"div">]> | undefined
Render the element yourself

RootContext

Property Default Type
children -
Snippet<[() => ToastApi<PropTypes, any>]>

Group

Property Default Type
toaster -
ToastStore<any>
children -
Snippet<[ToastProps<any>]> | undefined
element -
Snippet<[HTMLAttributes<"div">]> | undefined
Render the element yourself

Message

Property Default Type
element -
Snippet<[HTMLAttributes<"div">]> | undefined
Render the element yourself

Title

Property Default Type
element -
Snippet<[HTMLAttributes<"div">]> | undefined
Render the element yourself

Description

Property Default Type
element -
Snippet<[HTMLAttributes<"div">]> | undefined
Render the element yourself

ActionTrigger

Property Default Type
element -
Snippet<[HTMLAttributes<"button">]> | undefined
Render the element yourself

CloseTrigger

Property Default Type
element -
Snippet<[HTMLAttributes<"button">]> | undefined
Render the element yourself