<a class="btn btn-primary" data-toast-type="info" data-toast-text="Hi! I'm info message.">info message</a>

Alerts

Based on the version from MDB (https://mdbootstrap.com/javascript/alerts/)

Using the alerts element in HTML

To make the alerts work proper we need to initialize them:

<script>
    $('[data-toast-type]').click(function () {
        toastr[$(this).data('toast-type')]($(this).data('toast-text'))
    });
</script>