Text Area Component
This class handles the configuration of a textarea element.
Possible values to set are( default *) :
size : small | normal * | large
resizeBehavior : none | vertical *| horizontal
placeholder : String | Flow
disable : Boolean | Flow
value -> maybe you want to set an initial value instead of a placeholder
events -> access the DOM events of the underlying HTML element
element -> basic properties of the textarea html element; use with caution!
the base options of the HTML input element can be set. Attributes
Example usage
// Basic usage
textArea(value = dataStore) {
placeholder { "My placeholder" } // render a placeholder text for empty textarea
}
// Styling and options
textArea({ // use the styling parameter
background {
color { dark }
}
color { light }
radius { "1rem" }}, store = dataStore) {
disable(true) // textarea is disabled
resizeBehavior { none } // resizing is not possible
size { large } // render a large textarea
}
// disabled
textArea {
value { dataStore.data } // value depends on value in store
disable(true) // editing is disabled, but resizing still works
}
// all state management can also be done manually if needed:
val someStore = storeOf("some initial text")
textArea {
value(someStore.data)
events {
changes.values() handledBy someStore.update
}
}Constructors
Types
Functions
Property to manage the severity value of the component.
This function manages the task to map a value of the Severity enumeration to a corresponding style defined within the SeverityStyles interface. The severity itself is taken from the severity property, so only the styling interface's implementation has to be injected: