Toast

@sushindustries/ui

Strings, four seconds, bottom corner, announced politely - one provider and one hook, nothing else.

4 min read
View as MarkdownEdit on GitHub

Props

PropTypeDefaultDoes
childrenReactNode-
duration?number4000How long a toast stays, in ms.

Notes

children here is the app content ToastProvider wraps, not a toast itself - toasts are created only through useToast().toast(message), a plain string, never JSX. duration applies to every toast fired from that provider; there is no per-call override, so a page that genuinely needs two different durations needs a second, nested ToastProvider around just the part that does.