
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
toastify-lite-react
Advanced tools
Lightweight, customizable toast notification system for React with no external dependencies (except React).
Designed to be simple, flexible, and minimal.
top-left, top-right, bottom-center, etc.)slide, bounce, zoom)toast() functionnpm install react-toastify-lite
import ReactDOM from "react-dom/client";
import { ToastProvider, toast } from "react-toastify-lite";
function App() {
return (
<div>
<button onClick={() => toast({ type: "success", message: "Saved!" })}>
Show Toast
</button>
</div>
);
}
ReactDOM.createRoot(document.getElementById("root")).render(
<ToastProvider position="top-right">
<App />
</ToastProvider>
);
toast({ type, message, duration })
| Prop | Type | Required | Description |
|---|---|---|---|
type | string | No | One of: success, error, warning, info, default |
message | string | Yes | Text to display in the toast |
duration | number | No | Auto-dismiss time in milliseconds (default: 1000) |
<ToastProvider />
Wrap your application with ToastProvider.
| Prop | Type | Default | Description |
|---|---|---|---|
position | string | bottom-right | Position of the toast container. See supported positions. |
icons | object | {} | Custom icons per toast type. E.g. { success: () => <MyIcon /> } |
animation | string | fade | Animation type: fade, slide, bounce, zoom |
Supported position values:
top-left
top-right
top-center
bottom-left
bottom-right
bottom-center
center
Custom Icons
const MyIcons = {
success: () => <span style={{ color: "green" }}>✔️</span>,
error: () => <span style={{ color: "red" }}>❌</span>,
};
<ToastProvider icons={MyIcons}>
<App />
</ToastProvider>;
Custom Duration
toast({ type: "error", message: "Something went wrong", duration: 5000 });
Animation Types
<ToastProvider animation="slide">...</ToastProvider>
Positions
<ToastProvider position="bottom-left">...</ToastProvider>
<ToastProvider /> is mounted before calling toast(). If you call toast() too early, a warning will be shown in the console.Contributions are welcome!
If you'd like to help improve toastify-lite-react, feel free to open issues or submit pull requests.
FAQs
Lightweight toast notification library for React.
We found that toastify-lite-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.