pushButton

fun RenderContext.pushButton(styling: BasicParams.() -> Unit = {}, baseClass: StyleClass? = null, id: String? = null, prefix: String = "push-button", build: PushButtonComponent.() -> Unit = {})

This component generates a simple button.

You can set the label, an icon, the position of the icon and access its events. For a detailed overview about the possible properties of the component object itself, have a look at PushButtonComponent

In contrast to the clickButton component, this one does not return a Listener (basically a Flow) and so the event handling has to be done manually!

See also

Parameters

baseClass

optional CSS class that should be applied to the element

build

a lambda expression for setting up the component itself. Details in PushButtonComponent

id

the ID of the element

prefix

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

styling

a lambda expression for declaring the styling as fritz2's styling DSL