---
title: Textarea
description: Enter multiple lines of text with optional automatic resizing.
---
import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';
import TextareaReference from '/snippets/ui/generated/input/textarea.mdx';
Use `Textarea` for notes, descriptions, and other multiline values. It integrates with [Field](/ui/primitives/input/field) for labels and validation.
## Uncontrolled state
Use `defaultValue` to set the initial notes. The textarea owns subsequent changes.
```tsx
import { Field, Textarea } from 'twenty-ui/primitives/input';
export const NotesField = () => (
Notes
Add context for your team.
);
```
Native textarea attributes such as `rows`, `maxLength`, `required`, and `readOnly` are available. `size` accepts `sm` or `md` and defaults to `md`.
## Controlled state
Pass `value` and update it with `onValueChange` to own the same notes in React state. The callback receives the next string value and event details; native `onChange` is also available.
```tsx
import { useState } from 'react';
import { Field, Textarea } from 'twenty-ui/primitives/input';
export const NotesField = () => {
const [notes, setNotes] = useState('Follow up next week.');
return (
Notes
Add context for your team.
);
};
```
## Automatic resizing
Automatic resizing works in either state mode. This example also uses the controlled value for a character count.
```tsx
import { useState } from 'react';
import { Field, Textarea } from 'twenty-ui/primitives/input';
export const DescriptionField = () => {
const [description, setDescription] = useState('');
return (
Description
{description.length} of 500 characters
);
};
```
`autoResize` adjusts the textarea's height as its content changes. Use `maxRows` to cap the height. Keep keyboard focus on the textarea while the user types and use helper text for limits.
## Props
The reference is generated from the public component types. Native attributes, including accessible names and event handlers, are also accepted on parts that render elements.