OnsSwitch

open class OnsSwitch(value: Boolean = false, name: String? = null, label: String? = null, rich: Boolean = false, className: String? = null, init: OnsSwitch.() -> Unit? = null)

Onsen UI form field switch component.

Parameters

value

switch input value

name

the name attribute of the generated HTML input element

label

label text bound to the input element

rich

determines if label can contain HTML code

className

CSS class names

init

an initializer extension function

Constructors

Link copied to clipboard
constructor(value: Boolean = false, name: String? = null, label: String? = null, rich: Boolean = false, className: String? = null, init: OnsSwitch.() -> Unit? = null)

Creates a form field switch component.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val flabel: <Error class: unknown class>
Link copied to clipboard
Link copied to clipboard
val invalidFeedback: <Error class: unknown class>
Link copied to clipboard
var label: <Error class: unknown class>

The label text bound to the switch input element.

Link copied to clipboard

A modifier attribute to specify custom styles.

Link copied to clipboard
var rich: <Error class: unknown class>

Determines if label can contain HTML code.

Link copied to clipboard
var startValue: <Error class: unknown class>

The value attribute of the generated HTML input element.

Link copied to clipboard
open var value: <Error class: unknown class>

Switch input value.

Functions

Link copied to clipboard
open fun blur()
Link copied to clipboard
open fun buildClassSet(classSetBuilder: <Error class: unknown class>)
Link copied to clipboard
open fun focus()
Link copied to clipboard
open fun getState(): Boolean
Link copied to clipboard
open fun removeEventListener(id: Int)
Link copied to clipboard
Link copied to clipboard
open fun <T> setEventListener(block: <Error class: unknown class><T>.() -> Unit): Int
Link copied to clipboard
open fun setState(state: Boolean)
Link copied to clipboard
open fun subscribe(observer: (Boolean) -> Unit): () -> Unit