switch

fun <C : HTMLElement> RenderContext.switch(classes: String? = null, id: String? = null, scope: ScopeContext.() -> Unit = {}, tag: TagFactory<Tag<C>>, initialize: Switch<C>.() -> Unit): Tag<C>

Factory function to create a Switch.

API-Sketch:

switch() {
val value: DatabindingProperty<Boolean>
val enabled: Flow<Boolean>

switchValidationMessages() {
val msgs: Flow<List<ComponentValidationMessage>>
}
}

For more information refer to the official documentation


fun RenderContext.switch(classes: String? = null, id: String? = null, scope: ScopeContext.() -> Unit = {}, initialize: Switch<HTMLButtonElement>.() -> Unit): Tag<HTMLButtonElement>

Factory function to create a Switch with a HTMLButtonElement as default root Tag.

API-Sketch:

switch() {
val value: DatabindingProperty<Boolean>
val enabled: Flow<Boolean>

switchValidationMessages() {
val msgs: Flow<List<ComponentValidationMessage>>
}
}

For more information refer to the official documentation