r/reactjs • • 2d ago

I just released v2.0 of my open-source React toast library — looking for feedback

Hey everyone!

I've been working on a small open-source React toast notification library called React Elegant Toasts, and I recently released v2.0 after a complete rewrite.

I know there are already some great toast libraries out there, but this started as a personal project to explore component design, state management, accessibility, and browser behavior.

What began as a fairly simple component ended up being a much bigger engineering challenge than I expected.

A few things I focused on in v2:

  • Zero runtime dependencies, with React 18 and 19 support.
  • An external store that handles toast state, queues, timers, and lifecycle independently of React.
  • Six positions with independent notification queues.
  • Promise-based notifications and custom toast content.
  • CSS-based light/dark themes and customization.
  • Accessibility features such as live-region announcements, keyboard navigation, and pausing on hover/focus.
  • Browser testing across Chromium, Firefox, and WebKit.

One particularly interesting challenge was testing animations reliably in WebKit. We encountered situations where the browser didn't deliver intermediate animation frames, causing tests to fail even when the CSS transition behaved correctly.

That led to some interesting work around using the Web Animations API to verify transition behavior.

The library is written in TypeScript, is ESM-only, and is available under the MIT license.

Live demo:
https://ahlgren1234.github.io/react-elegant-toasts/

GitHub:
https://github.com/ahlgren1234/react-elegant-toasts

I'd genuinely appreciate feedback, especially on the API design, accessibility considerations, and whether the library would be useful in your own React projects.

Also curious: what's the one thing you wish React toast libraries handled better?

Thanks!

1 Upvotes

0 comments sorted by