TextAreaProps
Represents the props of the KendoReact TextArea component.
Definition
Package:@progress/kendo-react-inputs
Properties
ariaDescribedBy?
string
Identifies the element(s) which will describe the component, similar to HTML aria-describedby attribute. For example these elements could contain error or hint message.
ariaLabelledBy?
string
Identifies the element(s) which will label the component.
autoFocus?
boolean
Represents the autoFocus HTML attribute that will be applied to the input element of the TextArea. (Defaults to false)
autoSize?
boolean
Specifies if the textarea element will resize its height automatically (see example).
Defaults to false.
Setting the value of the prop to true will make the TextArea component to ignore the resize behavior of the resizable prop.
className?
string
Specifies a list of CSS classes that will be added to the TextArea.
defaultValue?
string | number | string[]
The default value of the TextArea (see example).
dir?
string
Represents the dir HTML attribute.
disabled?
boolean
Specifies if the TextArea is disabled (see example).
fillMode?
"flat" | "solid" | "outline"
Configures the fillMode of the TextArea.
The available options are:
- solid
- outline
- flat
undefined (theme-controlled)
flow?
"horizontal" | "vertical"
Configures the orientation/flow of the TextArea layout when using prefix or suffix.
The available options are:
- horizontal — Prefix and suffix are positioned to the left and right of the textarea(default).
- vertical — Prefix and suffix are positioned above and below the textarea.
horizontal
id?
string
Sets the id of the TextArea.
inputAttributes?
InputHTMLAttributes<HTMLInputElement>
Sets the HTML attributes of the inner focusable input element. Attributes which are essential for certain component functionalities cannot be changed.
name?
string
Specifies the name property of the textarea DOM element.
This property is part of the FormComponentProps interface.
onBlur?
(event: TextAreaBlurEvent) => void
The event handler that will be fired when TextArea is blurred.
onChange?
(event: TextAreaChangeEvent) => void
The event handler that will be fired when the changes the selected value.
onFocus?
(event: TextAreaFocusEvent) => void
The event handler that will be fired when TextArea is focused.
placeholder?
string
The hint that is displayed when the TextArea is empty.
prefix?
CustomComponent<any>
Sets a custom prefix to the TextArea component.
readOnly?
boolean
Sets the read-only state of the TextArea.
required?
boolean
Specifies if null is a valid value for the component.
This property is part of the FormComponentProps interface.
resizable?
"none" | "both" | "horizontal" | "vertical"
Defines the resize behavior of the TextArea. The available options are:
- none — The TextArea cannot be resized.
- vertical — The TextArea can be resized vertically.
- horizontal — The TextArea can be resized horizontally.
- both(default) — The TextArea can be resized both vertically and horizontally.
To be able to resize the TextArea, you should not set the autoSize property to true.
To be able to resize the component horizontally, add the following inline style to the TextArea:
<TextArea resizable='horizontal' style={{width: 'auto'}} />
rounded?
"small" | "medium" | "large" | "none" | "full"
Configures the roundness of the TextArea.
The available options are:
- small
- medium
- large
- full
undefined (theme-controlled)
rows?
number
Specifies an exact height size for the TextArea to take (see example).
size?
"small" | "medium" | "large"
Configures the size of the TextArea.
The available options are:
- small
- medium
- large
undefined (theme-controlled)
style?
CSSProperties
Sets additional CSS styles to the TextArea.
suffix?
CustomComponent<any>
Sets a custom suffix to the TextArea component.
tabIndex?
number
Sets the tabIndex property of the TextArea.
Defaults to 0.
valid?
boolean
Overrides the validity state of the component.
If valid is set, the required property will be ignored.
This property is part of the FormComponentProps interface.
validationMessage?
string
Controls the form error message of the component. If set to an empty string, no error will be thrown.
This property is part of the FormComponentProps interface.
validityStyles?
boolean
If set to false, no visual representation of the invalid state of the component will be applied.
This property is part of the FormComponentProps interface.
value?
string | number | string[]
Sets the value to be submitted (see example).
webMcp?
boolean | WebMcpProps
Enables Web MCP tool registration for this component.
Requires a parent WebMcpProvider from @progress/kendo-react-webmcp.