Whisper

React Snackbar Component

Usage

Download the single file of code from the GitHub repository, add it to your project, and wrap your app with the context provider.

<SnackbarProvider>
...
</SnackbarProvider>
const { snackbar } = useSnackbar();

You will also need to install the package dependencies.

npm install framer-motion
npm install tailwindcss

Types

snackbar("You have arrived at the Royal Museum");

Options

snackbar("You await your fate in an interrogation room", {
	icon: <ClockIcon />,
});

Positions

<SnackbarProvider maxSnacks={6} position="bottom-right">