Toasts
Push notifications to your visitors with a toast, a lightweight and easily customizable alert message.
Considerations:
Usage
{% include 'radix:button' with {
color: 'primary',
content: "Show live toast",
id: 'liveToastBtn',
} %}{% include 'radix:toasts' with {
with_wrapper: true,
with_container: true,
container_classes: 'position-fixed bottom-0 end-0 p-3',
toasts: [
{
header: {
title: 'Radix Toast Title',
subtitle: '11 mins ago',
classes: 'text-primary bg-light'
},
body: 'This is the first toast message.',
role: 'alert',
autohide: false,
with_body_wrapper: false,
with_close: true,
delay: 10000,
attributes: {
'class': ['extra-toast-class'],
'id': 'liveToast'
},
additional_buttons: [
{
text: 'Action 1',
color: 'secondary',
outline: true,
button_utility_classes: ['me-2'],
},
{
text: 'Action 2',
color: 'success',
outline: false,
button_utility_classes: ['me-2'],
}
]
}
],
} %}Last updated