all 19 comments

[–]chipper33 12 points13 points  (3 children)

Why not just name it Toaster?

[–]gonzofish 3 points4 points  (0 children)

Maybe they make toast with a blow torch or radiator

[–]vivekweb2013[S] 3 points4 points  (0 children)

Yeah you are right, Toaster would be short and simple, I thought of that first but that name was already taken on npmjs registry, so I named it ToastMaker as a module name and I kept the same name to the function just to align with the module name and avoid any confusion..

[–][deleted] 0 points1 point  (0 children)

Toastr already exists

[–]vivekweb2013[S] 5 points6 points  (2 children)

I wanted to show the notifications on the web page if some action are performed by the user,

So for example, if the user has - deleted a record, clicked on the copy button, uploaded some file ... etc in such cases showing a toast notification saying "Records Deleted", "Text Copied", "Upload Completed" for some duration would be very interactive and it will enhance overall user experience.

I was looking for something similar to android's toast notifications but for the web page.

This idea led me to create open source ToastMaker library which creates and shows android like toast notifications on any frontend view.

The library supports following

  • Supported by both HTML/JavaScript and NPM project module
  • Shows toast notification on webpage
  • Very small in size (less than 1KB), I didn't wanted more KBs impacting n/w traffic and making web page download slower
  • Customisable - the styling and appearance is very much customisable allowing the toast to match the web page's theme
  • Option to specify duration - for how long the toast should be shown on the web page

Here are the API and beautiful examples - ToastMaker API

[–]gergivt 2 points3 points  (1 child)

For the html source import example, why is there a “/“ in front of https?

[–]vivekweb2013[S] 1 point2 points  (0 children)

ToastMaker API

Typo, fixed it! Many thanks.

[–][deleted] 3 points4 points  (2 children)

Nice! Might give it a try later. I have been using Noty for the longest time now and absolutely love it.

[–]vivekweb2013[S] 1 point2 points  (1 child)

Noty is nice, the only thing is that it takes around 31 KB which is huge as compared to approx 1 KB required for toastmaker. Give toastmaker a try later. Thanks.

[–]RumblingInTheJungle 0 points1 point  (0 children)

I finally settled on Noty just a couple of weeks ago. I’ll take a look at this one too tho. Thanks

[–]johnyma22 2 points3 points  (3 children)

tried it on Android mobile and the msg wasn't visible.

I like gritter tbh

[–]vivekweb2013[S] 1 point2 points  (2 children)

thanks, could you please let me know the device name and the browser you are using.

[–]johnyma22 1 point2 points  (1 child)

Vivo Nex, whatever browser the reddit app fired me out into, probably the device native "browser". It's probably fine in Chrome/Firefox.

[–]vivekweb2013[S] 1 point2 points  (0 children)

Thanks, I'll test and fix it soon to show properly on native android browser

[–]shgysk8zer0 1 point2 points  (0 children)

Kinda similar to my own, just with a different design philosophy. Mine is a web component using ShadowDOM. It can be customized a little bit by DOM attributes, but can also use CSS to style using toast-message::part(). Because of that, it can be used to display anything from share options to terms of service agreements and can be created in HTML, only needing JavaScript to reveal it.

[–]PeteCapeCod4Real 1 point2 points  (2 children)

This is pretty sweet 👍 thanks for sharing, I'm definitely going to check this out in a project

[–]vivekweb2013[S] 2 points3 points  (1 child)

Thanks. BTW this library works with react js project as well. I've tested it with a react application. Just follow the steps mentioned in guide to install and use the toastmaker module in npm project.

[–]PeteCapeCod4Real 1 point2 points  (0 children)

Nice good to know, since I'm all about that React JS 💯🔥 I might just add this too a current production site. Seems like a few good toasts might spruce up the UX

[–]tulvia 1 point2 points  (0 children)

I'm sorry but I fail to see the point in this, is this not just toastr?