OnsNumber

open class OnsNumber(value: Number? = null, min: Number? = null, max: Number? = null, step: Number = DEFAULT_STEP, placeholder: String? = null, floatLabel: Boolean? = null, name: String? = null, label: String? = null, rich: Boolean = false, className: String? = null, init: OnsNumber.() -> Unit? = null)

Onsen UI form field number component.

Parameters

value

number input value

min

minimal value

max

maximal value

step

step value (default 1)

placeholder

the placeholder for the number input

floatLabel

whether the placeholder will be animated in Material Design

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: Number? = null, min: Number? = null, max: Number? = null, step: Number = DEFAULT_STEP, placeholder: String? = null, floatLabel: Boolean? = null, name: String? = null, label: String? = null, rich: Boolean = false, className: String? = null, init: OnsNumber.() -> Unit? = null)

Creates a form field number component.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var autocomplete: <Error class: unknown class>?

Determines if autocomplete is enabled for the input element.

Link copied to clipboard

Determines if the number input is automatically focused.

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

Whether the placeholder will be animated in Material Design.

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 number input element.

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

Maximal value.

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

Minimal value.

Link copied to clipboard

A modifier attribute to specify custom styles.

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

The placeholder for the number input.

Link copied to clipboard

Determines if the number input is read-only.

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
var step: <Error class: unknown class>

Step value.

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

Number 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(): Number?
Link copied to clipboard
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: Number?)
Link copied to clipboard
open fun subscribe(observer: (Number?) -> Unit): () -> Unit