Skip to content

Toast

The Sonner toaster on glass-strong. Mount <Toaster /> once at the root and call toast() from anywhere: success, error and the rest map to the status tokens.

import { Button, toast } from '@andrewbehma/glass-ui';

Playground

Toast.tsx
import { Button, toast } from '@andrewbehma/glass-ui';
<Button
onClick={() =>
toast.success("Deployment finished", {
description: "glass-showcase is live on production.",
})
}
>
Show toast
</Button>

States

Each tile is the live component. Open one in the playground to keep tweaking it.

  • Success
  • Error
  • Warning