Ryfylke React Toast

@ryfylke-react/toast is a lightweight headless toast library.

The problem

Most toast-libraries I’ve come over are generally very clunky and opinionated. Yes, you can customize the toasts through options and props, but it’s generally tedious, and you have to overwrite their existing styles. I’ve found that whenever I’ve needed to build a toast-system, I’ve ended up just building it myself to have more control over the behaviour and design.

The solution

This library does three things for you:

  • Sets up the communication between the toast function and the toast-list component.
  • Lets you easily specify the type/interface you want for your toasts
  • Lets you easily configure auto-dismissal (on a global or per-toast basis)

This allows you to quickly set up a simple toast-system, and then extend it easily with whatever behaviour and design you desire.

You can read more about this library at the official docs.