Toast

A succinct message that is displayed temporarily.

Preview

Installation

npm install @matrix-ui/components

Usage

import { useToast, Toaster } from '@matrix-ui/components'

// Add Toaster to your app root
<Toaster />

// Use the hook in your components
const { toast } = useToast()

toast({
  title: "Success",
  description: "Your action was completed.",
  variant: "success"
})

Examples

With variants