# Textarea

- **[Atoms](/components/)**

Multi-line text, resizable vertically.

## When to use

- **Use for**: Messages and notes of a few lines or more.
- **Not for**: One-line answers. Use Input.
- **Pairs with**: Field, contact forms.

## Preview

textarea.tsx

```
import { Theme } from '@/components/klarhimmel/theme/style';
import { Textarea, Field } from '@/components/klarhimmel/ui/input';

export default function Example() {
  return (
    <Theme theme="brand">
      <Field label="Message">{(p) => <Textarea {...p} />}</Field>
    </Theme>
  );
}
```

## Import

- **CLI**

  ```
  npx shadcn add @klarhimmel/input
  ```
- **Import**

  ```
  import { Textarea } from '@/components/klarhimmel/ui/input';
  ```

- **Files**: input.tsx, in components/klarhimmel/ui/. With it: button, editing, theme, utils.
- **Render in**: Render it inside <Theme>, once near the root of your app. Tokens and fonts are scoped to it, so outside it the component is unstyled.

## Props

- **rows**: Visible lines before it scrolls.
- **...textarea**: Native attributes are passed through.
- **className**: Extra classes, merged after the component's own.

## Accessibility

- Tab · Moves into and out of the field
- Enter · Adds a line

[Accessibility](/get-started/accessibility)

[Previous](/components/input)

[Next](/components/switch)
