Text Area Component
open class TextAreaComponent(valueStore: Store<String>?) : Component<TextArea> , EventProperties<HTMLTextAreaElement> , ElementProperties<TextArea> , InputFormProperties, SeverityProperties, TooltipProperties
Content copied to clipboard
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
TextAreaComponent
Link copied to clipboard
Types
Functions
severity
Link copied to clipboard
open override fun severity(value: SeverityProperties.SeverityContext.() -> Severity)
Content copied to clipboard
severityClassOf
Link copied to clipboard
open override fun severityClassOf(severityStyle: SeverityStyles): Flow<StyleClass>
Content copied to clipboard
tooltip
Link copied to clipboard
Properties
disabled
Link copied to clipboard
element
Link copied to clipboard
events
Link copied to clipboard
open override val events: ComponentProperty<EventContext<HTMLTextAreaElement>.() -> Unit>
Content copied to clipboard
placeholder
Link copied to clipboard
readonly
Link copied to clipboard
renderTooltip
Link copied to clipboard
open override val renderTooltip: ComponentProperty<Tag<HTMLElement>.() -> Unit>
Content copied to clipboard
resizeBehavior
Link copied to clipboard
val resizeBehavior: ComponentProperty<TextAreaResize.() -> Style<BasicParams>>
Content copied to clipboard
severity
Link copied to clipboard
size
Link copied to clipboard
value
Link copied to clipboard
variant
Link copied to clipboard
val variant: ComponentProperty<TextAreaVariants.() -> Style<BasicParams>>
Content copied to clipboard