/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { ToggleBaseProps } from '../../interfaces/ToggleBaseProps'; import { FormComponentProps } from '@progress/kendo-vue-common'; import { CheckboxChangeEvent } from './CheckboxChangeEvent'; import { CheckboxFocusEvent } from './CheckboxFocusEvent'; /** * Represents the props of the [Kendo UI for Vue Checkbox component]({% slug overview_checkbox %}). */ export interface CheckboxProps extends ToggleBaseProps, FormComponentProps { /** * Sets the checked state of the Checkbox. * Set to null to enable the indeterminate state of the Checkbox ([see example]({% slug overview_checkbox %})). */ checked?: boolean | null; /** * @hidden */ modelValue?: string | number | string[] | boolean | null; /** * If the type is different than boolean and the `checked` property is provided it's * passed to the underlying `input` element. * If set to boolean and the `checked` property is omitted sets the checked state of the Checkbox. * Set null to enable the indeterminate state of the Checkbox ([see example]({% slug overview_checkbox %})). */ value?: string | number | string[] | boolean | null; /** * Sets the default value of checked attribute when used in * uncontrolled mode ([see example]({% slug default_state %})). */ defaultChecked?: boolean; /** * The default value of the Checkbox. */ defaultValue?: any; /** * Represents the `dir` HTML attribute. This is used to switch from LTR to RTL. */ dir?: string; /** * Sets the disabled state of the Checkbox * ([see example]({% slug disabled_checkbox %})). */ disabled?: boolean; /** * Sets the `id` of the Checkbox. */ id?: string; /** * Configures the `size` of the Checkbox. * * The available options are: * - small * - medium * - large * * @default undefined */ size?: 'small' | 'medium' | 'large'; /** * Configures the `rounded` style of the Checkbox. * * The available options are: * - none * - small * - medium * - large * * @default undefined */ rounded?: 'none' | 'small' | 'medium' | 'large'; /** * Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute). * For example these elements could contain error or hint message. */ ariaDescribedBy?: string; /** * Identifies the element(s) which will label the component. */ ariaLabelledBy?: string; /** * Sets the label of the Checkbox component ([see example]({% slug labels_checkbox %})). */ label?: string | HTMLElement; /** * Sets the label render template of the Checkbox component. * Accepts a slot name, a `render` function, or a Vue component. */ labelRender?: any; /** * Sets the label position of the Checkbox component 'before' | 'after' ([see example]({% slug labels_checkbox %})). */ labelPlacement?: string; /** * Sets the optional text after the label of the Checkbox component. */ labelOptional?: boolean; /** * Sets the `class` of the label element of the Checkbox. */ labelClass?: string; /** * The event handler that will be fired when the user edits the value. */ onChange?: (event: CheckboxChangeEvent) => void; /** * The event handler that will be fired when Checkbox is focused. */ onFocus?: (event: CheckboxFocusEvent) => void; /** * Sets the `tabIndex` property of the Checkbox. * Defaults to `0`. */ tabIndex?: number; }