# Textarea — React Native component for Expo

> A multiline field that glides taller line by line, with a ring-style counter.

Multiline field that glides taller line by line between minRows and maxRows, with a floating label, a focus halo, animated error / success states, a counter that morphs into a progress ring (amber at 90%, red at the limit) and a toolbar slot for chat composers.

- Docs: https://expokit.in/docs/components/textarea
- Tier: Free
- Also called: multiline text input, auto-growing text area, comment box
- Category: Inputs
- Platforms: iOS, Android, web
- Expo Go: yes, no development build needed
- npm dependencies: react-native-svg
- Uses ExpoKit items: kit
- Variants: Composer, Review, Feedback, Character Limit, States, Sizes

## Installation

Run once per project: `npx @expokit/cli@latest init` (shared theme + KitProvider). Then:

```bash
npx @expokit/cli@latest add textarea
```

The CLI copies the source into your project (you own the code) and installs react-native-svg.

Import: `import { Textarea } from "@/components/ui/textarea";`

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` | `string` | — | Rests on the first line, floats onto the border on focus. |
| `floatingLabel` | `boolean` | `true` | Set to false to put the label above the field as static text (no notch); placeholder shows inside. |
| `variant` | `"outlined" \| "filled"` | `"outlined"` | Field style. |
| `size` | `"sm" \| "md" \| "lg"` | `"md"` | 14 / 16 / 18px text; line height and padding scale too. |
| `minRows / maxRows` | `number` | `3 / 8` | Grows smoothly between these, then scrolls. |
| `maxLength` | `number` | — | Character limit; enables the counter. |
| `enforceMaxLength` | `boolean` | `true` | false makes the limit soft: typing past it turns the counter red and negative. |
| `showCount` | `boolean` | `true when maxLength` | Counter that becomes a ring in the last 20%. |
| `toolbar` | `ReactNode` | — | Row inside the bottom edge — attach, emoji, send. |
| `error` | `string` | — | Red state, icon + message that slides in, one shake. |
| `success` | `boolean \| string` | — | Green border + animated check; a string is shown as the message. |
| `helper` | `string` | — | Hint under the field. |
| `accent` | `string` | `theme accent` | Focus border and halo colour. |
| `surface` | `string` | `theme background` | Colour behind the field (paints the label notch). |
| `style` | `StyleProp<ViewStyle>` | — | Style for the outer wrapper around the field and footer (the one that shakes). |
| `className` | `string` | — | Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. |
| `fieldStyle` | `StyleProp<ViewStyle>` | — | The bordered box: background, border width / colour, radius, height, padding. Wins over the computed style; a borderColor replaces the resting border only (focus, error and success colours still show). height is ignored: the box grows with minRows / maxRows. |
| `inputStyle` | `StyleProp<TextStyle>` | — | The typed text — fontSize, lineHeight, fontWeight, color, fontFamily. Row height follows lineHeight (or scales with fontSize). |
| `labelStyle` | `StyleProp<TextStyle>` | — | Label in both modes (floating and above). color is the resting colour — focus (accent), error and success still take over; fontSize sets the resting size, it floats at the same ratio and the notch follows its width. |
| `messageStyle` | `StyleProp<TextStyle>` | — | Helper / error / success text. color applies to the helper; error and success keep their tone colour. |
| `counterStyle` | `StyleProp<TextStyle>` | — | Counter text (42/280 and the characters-left number); warning / danger still win near the limit. |
| `placeholderTextColor` | `string` | `theme mutedForeground` | Placeholder colour. |
| `…TextInputProps` | `` | — | value, defaultValue, onChangeText, placeholder, … |

## Behaviour & accessibility

- **Motion**: The box grows smoothly between minRows and maxRows as you type; the label floats up on focus and a halo glows around the field.
- **Screen readers**: The input is labelled by label or placeholder; the counter reads like '42 of 200 characters left' and error / success messages land in a polite live region.
- **Web**: The browser focus outline is removed; the field draws its own focus halo.

## FAQ

### How do I make a multiline text input in React Native?

Use ExpoKit's Textarea: run npx @expokit/cli@latest add textarea in your Expo or React Native project and it copies a ready-made multiline text input into your app as plain TypeScript you can edit. It works on iOS, Android and web, and in Expo Go.

### Does Textarea work in Expo Go?

Yes. Textarea runs in Expo Go on iOS and Android with no development build — its packages (react-native-svg) are all included in Expo Go.

### How do I add Textarea to my Expo app?

Run npx @expokit/cli@latest add textarea in your project. The CLI copies the component's source into your app and installs react-native-svg, so the code is yours to change.

### Is Textarea free?

Yes. Textarea is free: its full source is on this page and the CLI installs it without an account.

### Can I change how Textarea looks?

Yes. It takes its colours, radius and light / dark mode from useKit(), so wrapping your app in <KitProvider accent radius> re-skins it with every other ExpoKit component. The code lives in your project, so you can also edit anything directly.

## More

- Live preview, variants and code: https://expokit.in/docs/components/textarea
- Every ExpoKit component, screen, template and chart: https://expokit.in/llms.txt
- Install commands and props for every free component: https://expokit.in/llms-full.txt
- Pricing: https://expokit.in/pricing
