inputField

fun RenderContext.inputField(    styling: BasicParams.() -> Unit = {},     value: Store<String>? = null,     baseClass: StyleClass = StyleClass.None,     id: String? = value?.id,     prefix: String = "inputField",     build: InputFieldComponent.() -> Unit = {}): Input

This component generates a text based input field.

You can optionally pass in a store in order to set the value and react to updates automatically.

There are options to choose from predefined sizes and some variants from the Theme.

To enable or disable it or to make it readOnly just use the well known attributes of the HTML input element. To manually set the value or react to a change refer also to its event's. All that can be achieved via the ElementMixin.element property!

Basic usage

val text = storeOf("")
inputField(value = text) {
placeholder("Enter some text")
}

See also

Parameters

styling

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

value

optional Store that holds the data of the input

baseClass

optional CSS class that should be applied to the element

id

the ID of the element

prefix

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

build

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