Feedback

Toast

A succinct message that is displayed temporarily. Built with Sonner.

Saved!

Your changes have been saved.

Error

Something went wrong. Try again.

Warning

Approaching storage limit.

Update available

A new version is ready.

Installation

npx benflux-ui add toast

Setup

// app/layout.tsx — already included if you use BenfluxProvider
import { Toaster } from "@benflux-ui/react"

<Toaster position="bottom-right" />

Usage

import { toast } from "@benflux-ui/react"

// Variants
toast.success("Saved!", { description: "Your changes have been saved." })
toast.error("Something went wrong")
toast.warning("Approaching limit")
toast.info("Update available")

// Custom duration
toast("Hello!", { duration: 5000 })

// Promise toast
toast.promise(saveData(), {
  loading: "Saving...",
  success: "Saved!",
  error: "Failed to save",
})