Interactive Toast Notification Demo

Toast Types

Customize Toast

Next.js Guide

To get started with Next.js, follow these steps:

'use client';

import React from 'react';
import { ToastContainer, ToastProvider } from 'react-smooth-toast';
import 'react-smooth-toast/style.css';


export function ToastWrapper({ children }: { children: React.ReactNode }) {
  return (
    <ToastProvider>
      {children}
    <ToastContainer position='top-right' variant='progress' pauseOnHover={true} groupCount={3} groupId='group-id'/>
    </ToastProvider>
  );
}
    

Start using the toast component in your project:

import { useToast } from 'react-smooth-toast'

const { success } = useToast()

success({
  message: 'This is a toast notification',
  variant: 'minimal',
  position: 'top-right'
})

Features

  • Multiple toast types: success, info, warning, error
  • Promise-based toasts for asynchronous operations
  • Customizable variants: minimal, material, modern, progress
  • Flexible positioning options
  • Easy integration with existing React projects
  • Interactive code snippet generation
  • Real-time preview of toast notifications