Resize in Blazor TextArea Component

14 Oct 20251 minute to read

The TextArea supports resizing so users can adjust the control to fit varying content lengths. Configure resizing behavior using the ResizeMode property:

Type Description
Vertical Enables vertical resizing to adjust the height of the TextArea.
Horizontal Enables horizontal resizing to adjust the width of the TextArea.
Both Enables both vertical and horizontal resizing.
None Disables resizing and hides the resize handle to maintain a fixed layout.

NOTE

In Razor, enums are typically referenced with the @ prefix (for example, @Resize.Both).

<SfTextArea Placeholder='Enter the Address' ResizeMode='Resize.Both'></SfTextArea>
Blazor TextArea with Resize

Width

Customize the width of the TextArea using the Width property. This property allows precise adjustment of the TextArea’s width according to the specific layout requirements of the application.

<SfTextArea Placeholder='Enter the Address' Width="500" ResizeMode='Resize.Both'></SfTextArea>
Blazor TextArea with Custom Width and Resize