simple-toast-react-lite
v1.0.1
Published
A lightweight and customizable toast notification component for React applications.
Maintainers
Readme
🪶 Simple Toast
A lightweight and customizable toast notification component for React applications.
Features
- Show/hide toast messages
- Auto-dismiss after a few seconds
- Different types: success, error, info, warning
- Customizable position (top-right, bottom-left, etc.)
- Optional close button
- Easy to integrate and extend
Installation (from GitHub)
git clone https://github.com/your-username/simple-toast.git
cd simple-toast
npm install
npm run buildUsage
import React from "react";
import { ToastProvider, useToast } from "simple-toast";
function Demo() {
const { showToast } = useToast();
return (
<div>
<button onClick={() => showToast("Success!", "success")}>Show</button>
</div>
);
}
export default function App(){
return (
<ToastProvider position="top-right">
<Demo />
</ToastProvider>
);
}License
MIT © AparnaCM
