Back to Tldraw

Toasts and dialogs

apps/examples/src/examples/ui/toasts-and-dialogs/README.md

4.5.11503 B
Original Source

Add, remove and clear toasts and dialogs in your app using the useToasts and useDialogs hooks.


To control toasts and dialogs your app, you can use the useToasts and useDialogs hooks. These hooks give you access to functions which allow you to add, remove and clear toasts and dialogs.

Dialogs are especially customisable, allowing you to pass in a custom component to render as the dialog content. Alternatively, you can use the ExampleDialog component which is provided by the library.