/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { FormComponentProps } from '@progress/kendo-vue-common'; import { TextAreaBlurEvent } from './TextAreaBlurEvent'; import { TextAreaChangeEvent } from './TextAreaChangeEvent'; import { TextAreaFlow } from './TextAreaFlow'; import { TextAreaFocusEvent } from './TextAreaFocusEvent'; import { TextAreaResize } from './TextAreaResize'; /** * Represents the props of the [Kendo UI for Vue TextArea component]({% slug overview_textarea %}). */ export interface TextAreaProps extends FormComponentProps { /** * 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; /** * Identifies the title of the TextArea component. */ title?: string; /** * Defines the built-in [minlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/minlength) property of the text inputs. * * As the property is directly passed to the internal [input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input) element, when defining it, it should be written as it is - `minlength`. Camel-case and kebap-case won't work in this scenario. */ minlength?: string; /** * Defines the built-in [maxlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/maxlength) property of the text inputs. * * As the property is directly passed to the internal [input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input) element, when defining it, it should be written as it is - `maxlength`. Camel-case and kebap-case won't work in this scenario. */ maxlength?: string; /** * Specifies if the textarea element will resize its height automatically ([see example]({% slug sizing_textarea %})). * Defaults to `false`. */ autoSize?: boolean; modelValue?: string | string[] | number; /** * Specifies a list of CSS classes that will be added to the TextArea. */ className?: string; /** * The default value of the TextArea ([see example]({% slug default_textarea %})). */ defaultValue?: string | string[] | number; /** * Represents the `dir` HTML attribute. */ dir?: string; /** * Specifies if the TextArea is disabled ([see example]({% slug disabled_textarea %})). */ disabled?: boolean; /** * Sets the read-only state of the TextArea. */ readOnly?: boolean; /** * Specifies an exact height size for the TextArea to take ([see example]({% slug sizing_textarea %})). */ rows?: number; /** * Sets the `id` of the TextArea. */ id?: string; /** * Specifies the `name` property of the `textarea` DOM element. */ name?: string; /** * The hint that is displayed when the TextArea is empty. */ placeholder?: string; /** * Sets the `tabIndex` property of the TextArea. * Defaults to `0`. */ tabIndex?: number; /** * Configures the `size` of the NumericTextBox. * * The available options are: * - small * - medium * - large * * @default undefined */ size?: 'small' | 'medium' | 'large'; /** * Configures the `roundness` of the NumericTextBox. * * The available options are: * - none * - small * - medium * - large * - full * * @default undefined */ rounded?: 'none' | 'small' | 'medium' | 'large' | 'full'; /** * Configures the `fillMode` of the NumericTextBox. * * The available options are: * - solid * - outline * - flat * * @default undefined */ fillMode?: 'solid' | 'flat' | 'outline'; /** * Sets the value to be submitted ([see example]({% slug controlled_textarea %})). */ value?: string | string[] | number; /** * If set to `false`, no visual representation of the invalid state of the component will be applied. * * @default true */ validityStyles?: boolean; /** * Defines a string prop that controls the input icon. This property works only with the Kendo UI for Vue FontIcons. * Check the [Icons]({% slug icons %}) article for more information about how the Font Icon can be loaded to your project. */ iconName?: string; /** * Defines if the inputPrefix will be shown. Accepts a slot name, a `render` function, or a Vue component. */ inputPrefix?: boolean | string | Object | Function; /** * Defines if the inputSuffix will be shown. Accepts a slot name, a `render` function, or a Vue component. */ inputSuffix?: boolean | string | Object | Function; /** * Defines a boolean prop that controls whether to show the validation icon. Defaults to 'false'. */ showValidationIcon?: boolean; /** * Defines a boolean prop that controls whether to show the loading icon. Defaults to 'false'. */ showLoadingIcon?: boolean; /** * Defines a boolean prop that controls whether to show the clear icon. Defaults to 'false'. */ showClearButton?: boolean; /** * Defines additional class to the wrapper element. */ wrapperClass?: string; /** * Defines the flow direction of the TextArea sections. */ flow?: TextAreaFlow | string; /** * Defines the way the TextArea will resize. */ resizable?: TextAreaResize | string; /** * Defines additional class to the input element. */ inputClass?: string; /** * Sets the built-in HTML attributes of the inner focusable input element. * Attributes which are essential for certain component functionalities cannot be changed. */ inputAttributes?: Object; /** * The event handler that will be fired when the changes the selected value. */ onChange?: (event: TextAreaChangeEvent) => void; /** * The event handler that will be fired when TextArea is focused. */ onFocus?: (event: TextAreaFocusEvent) => void; /** * The event handler that will be fired when TextArea is blurred. */ onBlur?: (event: TextAreaBlurEvent) => void; }