
Product
Introducing Reports: An Extensible Reporting Framework for Socket Data
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.
itstoaster
Advanced tools
A lightweight, theme-aware, and customizable toast notification system — built for modern web apps.
npm install itstoaster
or
yarn add itstoaster
import { Toaster } from "itstoaster";
import "itstoaster/style.css";
const toast = new Toaster({
containerId: "custom-toast-container", // optional
stack: 5 // optional: max number of toasts visible at once
});
toast.success({
title: "Success!",
description: "Your settings have been saved.",
duration: 3000, // optional (default: 3000ms)
dismissable: true, // optional
position: "top-right" // optional: top-left, top-center, top-right
});
toast.warning({
title: "Warning!",
description: "Your action might have unintended consequences.",
duration: 5000, // optional
dismissable: false, // optional
position: "top-center" // optional
});
toast.error({
title: "Error!",
description: "Something went wrong.",
duration: 4000, // optional
dismissable: true, // optional
position: "top-left" // optional
});
toast.info({
title: "Information",
description: "This is some informational text.",
duration: 4000, // optional
dismissable: true, // optional
position: "top-left" // optional
});
| Option | Type | Default | Description |
|---|---|---|---|
title | string | null | null | Optional title text |
description | string | null | null | Optional description |
duration | number | false | 3000 | How long toast stays (in ms). Use false to disable auto-dismiss |
dismissable | boolean | false | Show a close button |
position | string | top-right | One of: top-left, top-center, top-right |
icon | string | Based on type | Override the default icon (see below) |
<html> tag:<html data-theme="dark">
| Type | Icon name |
|---|---|
| success | check_circle |
| warning | exclamation_circle |
| error | triangular_error |
| info | info_circle |
| close | cross |
✅ You can override any icon by passing a custom icon name in the icon option.
Toasts can be positioned at:
top-lefttop-centertop-right (default)When creating a new Toaster instance, you can pass these options:
| Option | Type | Description |
|---|---|---|
containerId | string | Optional ID to use for the toast container element |
stack | number | Max number of toasts shown at once (default: 3) |
MIT
Made with ❤️ by @dipeshmurmu2005
FAQs
A lightweight toast notification package for JavaScript
We found that itstoaster 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.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.