
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
pro-react-toast
Advanced tools
A professional React toast notification library with TypeScript support, themes, and animations
A professional React toast notification library with TypeScript support, multiple themes, position control, and smooth animations.
npm install pro-react-toast
# or
yarn add pro-react-toast
# or
pnpm add pro-react-toast
import { ToastProvider, ToastContainer } from "pro-react-toast";
function App() {
return (
<ToastProvider>
<YourAppContent />
<ToastContainer />
</ToastProvider>
);
}
import { useToast } from "pro-react-toast";
function MyComponent() {
const { toast } = useToast();
const showSuccessToast = () => {
toast.success("Wow Operation completed successfully!");
};
const showCustomToast = () => {
toast.custom("Custom message with icon!", {
icon: <span>🚀</span>,
position: "bottom-right",
theme: "dark",
duration: 5000,
});
};
return (
<div>
<button onClick={showSuccessToast}>Success</button>
<button onClick={showCustomToast}>Custom</button>
</div>
);
}
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Your app content |
maxToasts | number | 10 | Maximum number of toasts to keep in memory |
| Prop | Type | Default | Description |
|---|---|---|---|
maxToasts | number | 5 | Maximum toasts to display simultaneously |
position | ToastPosition | 'top-right' | Default position for toasts |
theme | ToastTheme | 'light' | Default theme for toasts |
className | string | '' | Custom CSS class |
| Option | Type | Default | Description |
|---|---|---|---|
duration | number | 4000 | Auto-dismiss time in ms (0 = no auto-dismiss) |
position | ToastPosition | 'top-right' | Toast position |
theme | ToastTheme | 'light' | Toast theme |
icon | ReactNode | undefined | Custom icon component |
closable | boolean | true | Show close button |
className | string | '' | Custom CSS class |
style | CSSProperties | {} | Inline styles |
type ToastPosition =
| "top-left"
| "top-center"
| "top-right"
| "middle-left"
| "middle-center"
| "middle-right"
| "bottom-left"
| "bottom-center"
| "bottom-right";
type ToastTheme = "light" | "dark" | "custom";
const { toast, clearAll } = useToast();
// Toast methods
toast.success(message, options?)
toast.error(message, options?)
toast.warning(message, options?)
toast.info(message, options?)
toast.custom(message, options?)
// Clear all toasts
clearAll()
You can customize toast appearance using CSS variables:
:root {
--toast-bg-success: #10b981;
--toast-bg-error: #ef4444;
--toast-bg-warning: #f59e0b;
--toast-bg-info: #3b82f6;
--toast-bg-custom: #8b5cf6;
--toast-text-color: #ffffff;
--toast-border-radius: 8px;
--toast-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}
import { CustomIcon } from "./icons";
toast.success("Success!", {
icon: <CustomIcon />,
});
toast.info("Styled toast", {
className: "my-custom-toast",
style: {
background: "linear-gradient(45deg, #667eea, #764ba2)",
},
});
const handleAsyncOperation = async () => {
try {
toast.info("Processing...", { duration: 0 });
await someAsyncOperation();
clearAll();
toast.success("Wow My Operation completed!");
} catch (error) {
clearAll();
toast.error("Ohhh My Operation failed!");
}
};
function NotificationCenter() {
const { toast } = useToast();
const notifications = [
{ type: "success", message: "Profile updated" },
{ type: "info", message: "New message received" },
{ type: "warning", message: "Storage almost full" },
];
const showAll = () => {
notifications.forEach((notif, index) => {
setTimeout(() => {
toast[notif.type](notif.message);
}, index * 500);
});
};
return <button onClick={showAll}>Show Notifications</button>;
}
# Install dependencies
npm install
# Build the package
npm run build
# Start demo in development
npm run demo:dev
# Build demo for production
npm run demo:build
This package is built with TypeScript and provides full type safety:
import { ToastOptions, ToastPosition, ToastTheme } from "pro-react-toast";
const options: ToastOptions = {
duration: 5000,
position: "top-left",
theme: "dark",
closable: true,
};
At pro-react-toast, we believe in building with the community. Have an idea, improvement, or feature request? We’re all ears!
We welcome feedback, discussions, and collaboration to make the package more powerful and flexible for everyone.
licensed under the MIT
Made with ❤️ by Biren Gohel
FAQs
A professional React toast notification library with TypeScript support, themes, and animations
We found that pro-react-toast 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.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.