
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.
Neon, AI-feel toast notifications - zero deps, CSS auto-injected, swipe-to-dismiss, progress bar, positions, types, ARIA-friendly.
Solid by default, with optional mode: 'simple' or mode: 'neutral' via kilToast.configure().
Author: Kilvish (Vasu Birla) License: MIT
npm i kiltoast
CDN / self-host:
<script src="/node_modules/kiltoast/kiltoast.min.js"></script>
<!-- or your CDN -->
<script src="https://your.cdn/kiltoast.min.js"></script>
kiltoast.min.jsattaches a globalwindow.kilToast. No build step or CSS file needed.
<script src="kiltoast.min.js"></script>
<script>
kilToast('Hello world'); // info | center | 2s | solid (adaptive to light/dark)
</script>
import kilToast from 'kiltoast';
export default function SaveButton() {
return <button onClick={() => kilToast.success('Saved')}>Save</button>;
}
'use client';
import kilToast from 'kiltoast';
export default function Page() {
return <button onClick={() => kilToast.info('Welcome')}>Show toast</button>;
}
If you must call it from code that can run on the server, lazy-load it on the client:
useEffect(() => {
import('kiltoast').then(({ default: kt }) => kt.info('Client only'));
}, []);
kilToast(message, options?) -> ToastHandleCreates a toast.
Options (all optional):
position: "top-right" | "top-left" | "bottom-right" | "bottom-left" | "top-center" | "bottom-center" | "center" (default: "center")type: "info" | "success" | "warning" | "danger" (default: "info")duration: number ms (default: 2000; 0 = sticky)close: boolean show close button (default: true)pauseOnHover: boolean (default: true)clickToClose: boolean (default: true)showProgress: boolean (default: true)maxStack: number max visible per position (default: 6)gap: number px between toasts (default: 10)offset: number px from screen edge (default: 16)id: string custom id you assign (used to reference this toast later)replaceId: string id of an existing toast to replace in-placeicon: string|HTMLElement override icon (single char or small HTML)html: string set rich HTML content (if given, message is ignored)rtl: boolean right-to-left content (default: false)ToastHandle:
.el: HTMLElement root element.dismiss(): programmatically close the toast.update({ type?, text?, html?, icon? }): live-patch content/type/iconHelpers:
kilToast.success(msg, opts?)
kilToast.info(msg, opts?)
kilToast.warning(msg, opts?)
kilToast.danger(msg, opts?)
kilToast.configure(defaults) // set global defaults for future toasts
kilToast.destroyAll() // remove every toast on the page
<script>
kilToast('Order placed - pay later'); // info, center, 2s
</script>
kilToast('Saved successfully', {
type: 'success',
position: 'top-right',
duration: 3000,
close: true
});
kilToast.success('Profile updated');
kilToast.warning('Low balance', { position: 'bottom-center' });
kilToast.danger('Payment failed', { duration: 5000 });
kilToast.info('New version available');
Replace a running toast (useful for progress -> success).
// Start sticky "Uploading."
kilToast('Uploading.', {
id: 'up1',
type: 'info',
duration: 0, // sticky
showProgress: false,
close: true
});
// Later: replace in-place
setTimeout(() => {
kilToast('Upload complete', {
replaceId: 'up1',
type: 'success',
duration: 1800
});
}, 1200);
// Without mode
kilToast.configure({
position: 'top-right',
duration: 2500,
gap: 12,
offset: 18
});
// With mode: 'simple'
kilToast.configure({
position: 'top-right',
duration: 3000,
gap: 12,
offset: 18,
mode: 'simple' // Simple toasts
});
kilToast.configure({
position: 'top-right',
duration: 3000,
gap: 12,
offset: 18,
mode: 'neutral' // Glass look
});
// This toast uses the new defaults
kilToast('Defaults applied', { type: 'success' });
const t = kilToast('Syncing.', { duration: 0 }); // sticky
// Update content/type
setTimeout(() => t.update({ type: 'success', text: 'Synced!' }), 800);
// Close when you want
setTimeout(() => t.dismiss(), 1200);
kilToast('', {
html: '<b>Heads up:</b> Check <a href="/invoices">Invoices</a> for details.',
icon: '!',
type: 'info',
position: 'bottom-center'
});
kilToast.configure({ mode: 'neutral' });
kilToast('Neutral info', { type:'info' });
kilToast('Neutral warn', { type:'warning' });
kilToast('Neutral error', { type:'danger' });
kilToast('Neutral success',{ type:'success' });
role="status" and aria-live="polite" to announce messages non-intrusively.aria-label="Close".All styles are injected once and controlled via CSS variables. The defaults adapt to light and dark via prefers-color-scheme. Override after the script if needed:
:root{
--kil-toast-radius: 14px;
--kil-toast-info: #1d4ed8;
--kil-toast-succ: #047857;
--kil-toast-warn: #ffb300; /* keep warning readable on light */
--kil-toast-dang: #b91c1c;
/* Fine-tune solid palettes (optional) */
--kil-toast-solid-info-bg:#e6efff;
--kil-toast-solid-info-fg:#0b3b8f;
}
Available variables (non-exhaustive):
--kil-toast-font, --kil-toast-radius, --kil-toast-pad, --kil-toast-gap, --kil-toast-shadow,
--kil-toast-info, --kil-toast-succ, --kil-toast-warn, --kil-toast-dang,
--kil-toast-solid-*-bg|fg for info/succ/warn/dang,
--kil-toast-glow-info|succ|warn|dang.
duration: 0 and show a close button.maxStack (per position). Oldest auto-trims beyond the limit.kilToast.configure({ position: 'top-right' }) once at app start.kilToast.configure({ mode: 'neutral' }) for a uniform glass look.kilToast.configure({ mode: 'simple' }) for flat color toasts.mode: 'neutral', reduced glow/blur, emoji icons.MIT (c) Kilvish (Vasu Birla)
FAQs
Neon, AI-feel toasts with positions, types, progress, swipe, and no deps.
We found that kiltoast 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.