Skip to main content
  1. Docs
  2. Components
  3. Overlays

Toast

A brief word that something happened, at the bottom end. One action at most, such as Undo.

Import
@qeetrix/react
Status
StableSince 0.0.2
Renders
<div role="region">Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

Playground

Every prop, live, and the code it takes.

Tone
send-invoice.tsx
import { Button, useToast } from "@qeetrix/react";

const toast = useToast();

<Button
  onClick={() => toast.add({ title: "Invoice sent", description: "To finance@acme.in.", tone: "success" })}
>
  Send invoice
</Button>

02

Tones

Info, success, warning and danger, each with its status edge and icon. Danger stays until it's closed, and is announced at once.

03

With Undo

One action at most: Undo, for something just done.

04

While it works

promise: a spinner while it's pending, then success or the reason it failed.

05

In Hindi

The region's name and the close button's come from QeetrixProvider.

Next — ToastUsage