BS5 toast extra classes

To be able to provide colourful toasts it would be nice if you could add from the UI extra classes to the different elements that build the toast(header, body, subtitle). Icon is already set via class and title is set via header class.

Code changes for header and body.

Line 55
if (((e += '<div class="toast-header ' + t.headerClass + '">'), t.icon))
Line 68
(e += '<div class="toast-body ' + t.bodyClass + '">' + (t.message || "") + "</div>")

Example of the show method

toast.show({message: 'message', title: 'title', subtitle:'subtitle', icon: 'far fa-times-circle', headerClass: 'bg-danger text-white'})

In the UI 3 extra text fields would be needed to set the classes(header, body and subtitle).

Bump

Bump

1 Like

Bump
This is essential, the current toasts are very plain, we need a fast and easy way to edit their look and feel.