MdCheckbox

open class MdCheckbox(checked: Boolean = false, disabled: Boolean = false, indeterminate: Boolean = false, required: Boolean = false, value: String = "on", name: String? = null, touchTarget: TouchTarget? = TouchTarget.Wrapper, validationMessage: String? = null, className: String? = null, init: MdCheckbox.() -> Unit? = null) : MdFormToggleInputWidget

Checkboxes allow users to select one or more items from a set. Checkboxes can turn an option on or off.

There's one type of checkbox in Material. Use this selection control when the user needs to select one or more options from a list.

See https://material-web.dev/components/checkbox/

Author

Maanrifa Bacar Ali

Constructors

Link copied to clipboard
constructor(checked: Boolean = false, disabled: Boolean = false, indeterminate: Boolean = false, required: Boolean = false, value: String = "on", name: String? = null, touchTarget: TouchTarget? = TouchTarget.Wrapper, validationMessage: String? = null, className: String? = null, init: MdCheckbox.() -> Unit? = null)

Properties

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

Whether or not the checkbox is selected.

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

Whether or not the widget is disabled.

Link copied to clipboard
val form: <Error class: unknown class>?

The associated form element with which this element's value will submit.

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

Whether or not the checkbox is indeterminate.

Link copied to clipboard
val labels: <Error class: unknown class>?

The labels this element is associated with.

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

The name to use in form submission.

Link copied to clipboard
open var parent: <Error class: unknown class>?
Link copied to clipboard
var required: <Error class: unknown class>

Indicates that the component must provides a valid value when participating in form submission.

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

Checkbox touch target.

Link copied to clipboard

Message to display when the component value is not valid.

Link copied to clipboard
val validity: <Error class: unknown class>?

Gets the element's current validity state.

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

The value that is submitted to the form.

Link copied to clipboard

Indicates that the element is a candidate for constraint validation.

Functions

Link copied to clipboard
open fun afterCreate(node: <Error class: unknown class>)
Link copied to clipboard
open override fun buildAttributeSet(attributeSetBuilder: <Error class: unknown class>)
Link copied to clipboard

Indicates the validity of the value of the element. If the value is invalid, this method also fires the invalid event on the element.

Link copied to clipboard
open fun dispose()
Link copied to clipboard
open fun render(): <Error class: unknown class>
Link copied to clipboard

Performs the same validity checking steps as the checkValidity method. If the value is invalid, this method also fires the invalid event on the element, and (if the event isn't canceled) reports the problem to the user.

Link copied to clipboard

Sets a custom validity message for the underlying element.

Link copied to clipboard
open override fun toggle()

Toggle the checked/selected state of this widget.