alert

fun RenderContext.alert(    styling: BasicParams.() -> Unit = {},     baseClass: StyleClass = StyleClass.None,     id: String? = null,     prefix: String = "alert",     build: AlertComponent.() -> Unit)

Creates an alert and renders it right away.

Usage example:

alert {
title("Alert")
content("This is an alert.")
severity { info }
}

See also

Parameters

styling

a lambda expression for declaring the styling of the toast using fritz2's styling DSL

baseClass

optional CSS class that should be applied to the toast element

id

the ID of the toast element

prefix

the prefix for the generated CSS class of the toast element resulting in the form `$prefix-$hash`

build

a lambda expression for setting up the component itself