TextArea Overview
A TextArea provides a highly customizable interface for displaying multi-line text and can be integrated in forms or used as a standalone item. Commonly, TextAreas are used for descriptions, comments, messages, and so on.
The length of the data string defines the type of the text field. As the TextArea is used for multi-line data, the TextBox is used for single-line data.
Live Demo
Appearance
TextAreas provide built-in styling options that grant visually appealing and flexible rendering experience. Apart from the default vision of the Telerik and Kendo UI TextArea, the component supports alternative styling options which enable you to configure the individual aspects of its appearance.
States
Depending on the action you want to imply through its appearance, the Telerik and Kendo UI TextArea can acquire and can be rendered in the following states:
- A TextArea in its normal state is fully active, but the user is not interacting with it. The component can contain an explanatory placeholder text or an already pre-filled text.
k-hover
–The hover state of a TextArea appears when the user is hovering over the component but has not clicked it yet. The mouse pointer changes to indicate that you can type in the component.k-focus
–The focus state of the TextArea indicates that the user has navigated to it with the keyboard, by using voice instructions, or has mouse-clicked the component. The focus has to be highlighted well enough to cover all accessibility requirements.k-invalid
–The invalid state of the TextArea is displayed when a validation requirement is not matched. It has to alarm the user that an extra input is needed to pass the validation so that the operation gets completed.k-invalid k-focus
—The invalid focus state is a result of spotlighting a TextArea whose values or type of input didn’t pass the validation requirements.k-disabled
–The disabled state is displayed when a user does not have an interactive permission. The disabled state entirely removes the interactive behavior of the component. Visually, the TextArea is faded out and slightly out of focus to distinguish itself from the active elements on the page.
Anatomy
The anatomy of the TextArea summarizes the elements of the component. Label and hint text options can be configured and added to a TextArea when it is used as a part of Telerik and Kendo UI Form component.
The next image shows the anatomy of a TextArea and includes the following elements:
![Anatomy and elements of a Telerik and Kendo UI TextArea including the input field, label, placeholder or input text, hint text, character counter, and resize handler elements. A Telerik and Kendo UI TextArea component with the input field, label, placeholder or input text, hint text, character counter, and resize handler elements.](/design-system/docs/static/db9d287538f4883a7176f02ca15adbd0/6966b/components-textarea-overview-anatomy.png)
- Input field
- Label (optional in Form components)
- Placeholder or input text
- Hint text (optional in Form components)
- Character counter (optional in Form components)
- Resize handler
The TextArea provides options both to the user and the developer to control its height. Users can resize the component vertically, horizontally, or in both directions with the resize handler. Developers can automatically adjust the height of the component based on the data input by using the AutoSize
configuration option.
![Two Telerik and Kendo UI TextAreas showing the resize handler option and the auto-resize configuration output respectively.](/design-system/docs/static/8bec7a14a3552297af21fc559b7ff929/6966b/components-textarea-overview-resize.png)
Size
The TextArea provides the size
configuration option that enables you to control its padding and font size. To avoid inconsistency when using the TextArea in a form, it is recommended that you set the same size to all components within that form.
size
provides the following available options:
small
—Renders small text areas, which are optimized for compact UI design. The small Telerik and Kendo UI TextArea uses the same typographic style as the medium text area. However, to decrease the height, the small TextArea applies a$kendo-spacing, 0.5
spacing value for its vertical padding.medium
(default)—Renders a medium text area. The medium Telerik and Kendo UI TextArea uses the same typographic style as the small text area. However, the vertical height of the component is achieved by setting the$kendo-spacing, 1
spacing value for its vertical padding.large
—Renders large text areas, which are suitable for layouts with a lot of space between the elements to achieve airy UI look and feel. The large TextArea is optimized for adaptive components and mobile UI design and achieves the recommended touch area dimensions both by doubling the value of its vertical padding to$kendo-spacing, 2
and by using a different typographic style with a bigger font size and line height.none
—Does not set asize
and allows you to add your own, custom value.
![Available sizes in the Telerik and Kendo UI TextArea component including small, default medium, and large. Three Telerik and Kendo UI TextArea components demonstrating the small, default medium, and large sizes respectively.](/design-system/docs/static/6a750e528cfe22a81f21a9df6b44bce9/6966b/components-textarea-overview-size.png)
- Small
- Medium (default)
- Large
Fill Mode
The TextArea provides the fillMode
configuration option that enables you to achieve a certain visual mood in your app. TextAreas also provide options for fill-mode customization.
fillMode
provides the following available options:
solid
(default)—The solid fill mode focuses on the layout and emphasizes the text field. It can be wrapped in a container with a different background color making the TextArea to stand out.outline
—The outline fill mode focuses less on the text field. Outlined TextAreas do not have a background fill and can blend with the surrounding UI environment.flat
—The flat fill mode emphasizes less the text field and more the data input. Also, the flat fill mode reduces additional visual noise and focuses on the content.none
—Does not set afillMode
and allows you to add your own, custom value.
![Available fill modes in the Telerik and Kendo UI TextArea component including default solid, outline, and flat. Three Telerik and Kendo UI TextArea components demonstrating the default solid, outline, and flat fill modes respectively.](/design-system/docs/static/3b2255bc996eaf0410c5d343dfd35bca/6966b/components-textarea-overview-fill-mode.png)
- Solid (default)
- Outline
- Flat
Border Radius
The TextArea provides the rounded
option that enables you to control the border radius of the rendered component. The defined value for the border radius significantly affects the look-and-feel of the UI. To avoid inconsistency, it is recommended that you follow a single concept of rounding the element in your UI. The TextArea also supports settings for border-radius customization.
rounded
provides the following available options:
small
—Renders a border radius of 2 px.medium
(default)—Renders a border radius of 4 px.large
—Renders a border radius of 6 px.none
—Does not set arounded
and allows you to add your own, custom value.
![Available border radiuses in the Telerik and Kendo UI TextArea component including small, default medium, and large. Three Telerik and Kendo UI TextArea components demonstrating the small, default medium, and large fill modes respectively.](/design-system/docs/static/16589b4dc6c25d374ebf3ec2a07f6390/6966b/components-textarea-overview-border-radius.png)
- Small
- Medium (default)
- Large
Framework-Specific Documentation
For specific information about the component, refer to its official product documentation: