Hi guys. I built a toast message system with htmx, hyperscript, and tailwind. I share the code here as it could help others. Feel free if you have any question or suggestion.
It consists on two parts:
- A View mixin to be used in CBVs, to embed HX-Trigger header containing the toast(s) data.
- A template to built toasts
<div>
in the DOM, as the events are received.