Tired of Vue toast libraries, so I built my own (headless, Vue 3, TS-first) #14197
adrianjanocko
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey folks 👋 author here, looking for feedback.
I recently needed a toast system for a Vue 3 app that was:
I tried several Vue toast libraries and kept hitting the same issues: a lot of them were Vue 2–only or basically unmaintained, the styling was hard-wired instead of properly themeable, some were missing pretty basic options, and almost none gave me predictable behavior for things like duplicates, timers, or multiple stacks.
So I ended up building my own: Toastflow (core engine) + vue-toastflow (Vue 3 renderer).
What it is
toastflow-core), andvue-toastflowis just a renderer on top with<ToastContainer />+ a globaltoasthelper.--success-bg,--error-text, etc.). You can swap the design by editing one file or aligning it with your Tailwind/daisyUI setup.top-left,top-center,top-right,bottom-left,bottom-center,bottom-right). Implemented withTransitionGroupand overridable viaanimationconfig.toastfrom anywhere (components, composables, services, plain TS modules). Typed helpers:toast.show,toast.success,toast.error,toast.warning,toast.info,toast.loading,toast.update,toast.dismiss,toast.dismissAll, etc.maxVisible, stack order (newest/oldest), andclear-allin a predictable way.toast.loading), optional HTML content withsupportHtml, lifecycle hooks, events (toast.subscribeEvents), timestamps (showCreatedAt,createdAtFormatter), and a headless slot API if you want to render your own card.Quick taste
Links
Beta Was this translation helpful? Give feedback.
All reactions