New to Kendo UI for Vue? Start a free 30-day trial

Checkbox

Component

Represents the KendoVue Checkbox component. Use the Checkbox to let the user turn an option on or off.

Definition

Package:@progress/kendo-vue-inputs

Properties Interface:CheckboxProps

Syntax:

vue
<Checkbox :default-checked="true" :label="'Subscribe to updates'" />

Properties

Sets the IDs of the elements that describe the Checkbox, like the HTML aria-describedby attribute. For example, these elements can contain an error or a hint message.

Sets the IDs of the elements that label the Checkbox.

checked?

boolean

Sets the checked state of the Checkbox. Set it to null to show the indeterminate state of the Checkbox (see example).

Sets the initial checked state of the Checkbox when you use it in uncontrolled mode (see example).

Sets the initial value of the Checkbox.

dir?

string

Sets the dir HTML attribute. Use it to switch from LTR to RTL.

disabled?

boolean

Sets whether the Checkbox is disabled (see example).

id?

string

Sets the id of the Checkbox input element. The label of the Checkbox uses it as its target.

label?

string | HTMLElement

Sets the label of the Checkbox (see example).

Sets the class of the label element of the Checkbox.

Sets whether the Checkbox shows the optional text after the label.

Sets the position of the Checkbox label. Accepts before or after (see example).

Sets the template of the Checkbox label. Accepts a slot name, a render function, or a Vue component.

name?

string

Sets the name property of the input DOM element.

Fires when the user changes the checked state. The event name is change.

Parameters:eventCheckboxChangeEvent

Fires when the Checkbox gets the focus. The event name is focus.

Parameters:eventCheckboxFocusEvent

required?

boolean

Sets whether null is a valid value for the component.

rounded?

"small" | "medium" | "large" | "none"

Sets the border radius of the Checkbox.

The available options are:

  • none
  • small
  • medium
  • large
Default:

undefined

size?

"small" | "medium" | "large"

Sets the size of the Checkbox.

The available options are:

  • small
  • medium
  • large
Default:

undefined

tabIndex?

number

Sets the tabIndex of the Checkbox. Defaults to 0.

valid?

boolean

Overrides the validity state of the component. When you set valid, the component ignores the required property.

Sets the form error message of the component. If you set it to an empty string, the component shows no error.

Shows or hides the invalid state styles of the component. When you set it to false, the component shows no invalid state styles.

value?

string | number | boolean | string[]

When the value is not a boolean and you set the checked property, the Checkbox passes the value to the underlying input element. When the value is a boolean and you do not set the checked property, the value sets the checked state of the Checkbox. Set it to null to show the indeterminate state of the Checkbox (see example).