π GA Toasts
Modern, accessible, dependency-free toast notifications for the web. Configure one live in the playground below β the code writes itself.
Getting started
Three lines to your first toast
Install, import, and call β no config or CSS wiring. It just works.
Install
npm install ga-toastsImport
import { toast } from 'ga-toasts'Toast anywhere
toast.success('Saved!')Playground
Build a toast, copy the code
Tweak the controls and the snippet writes itself. Switch to the Theme tab to restyle every toast with toast.theme().
Style
Shape & color
Recipes
Higher-level helpers
One-liners for the patterns you reach for most β promises, confirmations, and live updates.
Why GA Toasts
Small, accessible, and yours to theme
Everything you need, nothing you don't β configurable down to the design token.
Zero dependencies
One small file, ~11.5 KB gzipped. No framework, no jQuery, no runtime deps.
Accessible by default
WCAG AA contrast, ARIA live regions, focus management, and a modal confirm().
Dark mode & RTL
Automatic light/dark theming with design tokens, plus full right-to-left support.
Swipe to dismiss
Pointer/touch swipe, pause-on-hover, and a smooth stacked, fan-out-on-hover layout.
Batteries included
promise(), confirm(), custom content, actions, avatars, and update-in-place.
First-class TypeScript
Fully typed API, ESM + CJS + CDN builds, and generated .d.ts declarations.
FAQ
Frequently asked questions
What is GA Toasts?
GA Toasts is a modern, lightweight JavaScript library for creating beautiful toast notifications in web applications. It features 7 toast types, 9 positioning options, 8 animation effects, and 3 theme variants with full accessibility support.
How do I install GA Toasts?
Include the stylesheet and the script in your HTML, or install it from npm. It has zero dependencies β no jQuery or framework required β and is lightweight and optimized for performance.
Is GA Toasts accessible?
Yes, GA Toasts is built with accessibility in mind, supporting screen readers, keyboard navigation, and ARIA attributes for better user experience across all devices.
Can I customize the appearance of toasts?
Absolutely! GA Toasts offers extensive customization options including CSS variables, multiple variants (filled, light, default), different sizes, custom icons, and theme support for light/dark modes.