> To build a Wix site agentically, or add Wix features like bookings or a store to a site you already have, follow https://www.wix.com/headless/skill.md
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: InputArea Component

## Article: InputArea Component

## Article Link: https://dev.wix.com/docs/wix-design-system/components/form/input-area-component.md

## Article Content:

# InputArea

_Components/Form_

Interactive docs page: <https://wix-pages.com/design-system-documentation/#/component/inputarea>

## Overview

```jsx
<Box align="center">
  <Box direction="vertical" width="30%">
    <FormField label="Description">
      <InputArea
        placeholder="Tell participants about your program."
        resizable
        rows={5}
        hasCounter
        maxLength={400}
      />
    </FormField>
  </Box>
</Box>;
```

Input areas let users insert long text values. The large size of the field indicates that a user is expected to insert at least a few sentences.

### Do

- Use it to insert multiple lines of text.

### Don't

- Don't use it to insert short text values. Use `<Input/>` instead.

### Feature examples

#### Size

Adjust the size of the input using the `size` prop. It supports 2 sizes:

- For most common cases, use the default `medium.`
- Use `small` for more dense and compact layouts.

```jsx
<StorybookComponents.Stack flexDirection="column">
  <InputArea placeholder="Medium" size="medium" />
  <InputArea placeholder="Small" size="small" />
</StorybookComponents.Stack>;
```

#### Height

Control the height of an area by defining a minimum or maximum number of pixels, or a certain number of rows.

- To define the minimum and maximum height in pixels, use `minHeight` and `maxHeight`.
- Define the height of a specified number of rows with `rows`.

```jsx
<StorybookComponents.Stack flexDirection="column">
  <InputArea
    placeholder="Height defined in pixels"
    minHeight="120px"
    maxHeight="300px"
  />
  <InputArea placeholder="Height that fits 4 rows of text" rows={4} />
</StorybookComponents.Stack>;
```

#### Status

Control the status of the input using the `status` prop. It supports 3 states:

- `error` demonstrates that a required input is missing something or the entry was invalid.
- `warning` highlights an input value that might have a significant impact to a user.
- `loading` shows when an input value is being uploaded to the server.

```jsx
<StorybookComponents.Stack flexDirection="column">
  <InputArea placeholder="Error" status="error" />
  <InputArea placeholder="Warning" status="warning" />
  <InputArea placeholder="Loading" status="loading" />
</StorybookComponents.Stack>;
```

#### Status message

Add text that explains the status or what action the user should take with the `statusMessage` prop.

Showing the status message inline, directly below the component is preferred in all default cases.

- To add an accessible inline message, wrap the component in a `<FormField/>` and add the `statusMessage`.
- To add a status message in a tooltip that requires users to hover on the icon, use the `statusMessage` prop. Control tooltip placement with `tooltipPlacement` prop.

View more inline status message examples in `<FormField/>`.

```jsx
<StorybookComponents.Stack flexDirection="column">
  <StorybookComponents.Stack flexDirection="column" gap="12px">
    <Text secondary>For all default cases:</Text>
    <FormField status="error" statusMessage="This is an error message.">
      <InputArea placeholder="See message below" tooltipPlacement="top-end" />
    </FormField>
  </StorybookComponents.Stack>
  <StorybookComponents.Stack flexDirection="column" gap="12px">
    <Text secondary>For narrow layouts only:</Text>
    <InputArea
      placeholder="Hover on status icon"
      status="error"
      statusMessage="This is an error message."
      tooltipPlacement="top-end"
    />
  </StorybookComponents.Stack>
</StorybookComponents.Stack>;
```

#### Read-only and disabled

Inputs can also be made read-only or disabled entirely.

- `readOnly` disables adding or editing, but allows the user to copy the current value.
- `disabled`removes all interactions and creates a disabled input state. Use it to highlight functions that are unavailable.

```jsx
<StorybookComponents.Stack flexDirection="column">
  <InputArea value="Read-only" readOnly />
  <InputArea value="Disabled" disabled />
</StorybookComponents.Stack>;
```

#### Resize

Allow users to manually adjust the size of the input area by enabling the`resizable` prop.

```jsx
<InputArea
  placeholder="Drag the handle in the bottom right corner to change the height of an area."
  resizable
/>;
```

#### Character count

Indicate how many characters the input area contains by enabling the `hasCounter` prop. To display a counter, specify the `maxLength` of characters allowed in the field.

```jsx
() => {
  const [value, setValue] = React.useState(
    'This is a sentence that uses only some of the allowed characters.',
  );

  return (
    <InputArea
      value={value}
      onChange={(e) => setValue(e.target.value)}
      maxLength={100}
      hasCounter
    />
  );
};
```

#### Auto grow

Grow and shrink area size according to the input by enabling `autoGrow`. Specify the starting height of an area with `minRowsAutoGrow`.

```jsx
<InputArea
  placeholder="Enter a lot of text into this area to see how it grows according to the length of content."
  autoGrow={true}
  minRowsAutoGrow={1}
/>;
```

#### Auto select

Click to select/highlight all the text in the area with the `autoSelect` prop.

```jsx
<InputArea value="Click on the field to select the entire text." autoSelect />;
```

### Developer examples

#### Controlled

Component can be used in controlled mode by passing `value` and `onChange` props.

```jsx
() => {
  const [value, setValue] = React.useState('');
  return <InputArea value={value} onChange={(e) => setValue(e.target.value)} />;
};
```

#### Force autogrow when controlled externally

Auto grow feature does not work when component is used in controlled way which means using `value` and `onChange` properties. To force auto grow behaviour on state change just call ref method of component called `calculateComputedRows` which will recalculate rows on every value change.

```jsx
() => {
  const [value, setValue] = React.useState('');
  const ref = React.useRef(null);

  React.useEffect(() => {
    ref.current?.calculateComputedRows();
  }, [value]);

  const onInsertText = () => {
    setValue((prevValue) => prevValue + 'field grows on every click ');
  };

  return (
    <StorybookComponents.Stack width="100%" justifyContent="space-between">
      <Button onClick={onInsertText}>Insert Text</Button>
      <div style={{ width: '100%' }}>
        <InputArea
          ref={ref}
          value={value}
          onChange={(e) => setValue(e.target.value)}
          autoGrow
          placeholder="Click on Insert Text"
          minRowsAutoGrow={1}
        />
      </div>
    </StorybookComponents.Stack>
  );
};
```

### Common use case examples

#### Forms

Use input area when the user needs to enter multiple lines of text such as product descriptions and policies.

Use `<FormField/>` to provide a label for the field.

```jsx
() => {
  const [visibleChecked, setVisibleChecked] = React.useState(true);
  const [nameInputValue, setNameInputValue] = React.useState('My New Menu');
  const [value, setValue] = React.useState('');

  return (
    <CustomModalLayout
      primaryButtonText="Create Menu"
      secondaryButtonText="Cancel"
      onCloseButtonClick={() => {}}
      title="Create new menu"
    >
      <Layout gap="24px">
        <Cell span={12}>
          <FormField label="Name">
            <Input
              value={nameInputValue}
              onChange={(e) => setNameInputValue(e.target.value)}
            />
          </FormField>
        </Cell>
        <Cell span={12}>
          <FormField label="Description">
            <InputArea
              placeholder="Get people excited about your menu and your food."
              rows={4}
              maxLength={300}
              hasCounter
              resizable
              value={value}
              onChange={(e) => setValue(e.target.value)}
            />
          </FormField>
        </Cell>
        <Cell span={12}>
          <FormField
            label="Visible to customers"
            labelPlacement="right"
            stretchContent={false}
          >
            <ToggleSwitch
              checked={visibleChecked}
              onChange={() => setVisibleChecked(!visibleChecked)}
            />
          </FormField>
        </Cell>
      </Layout>
    </CustomModalLayout>
  );
};
```

#### Settings panel

Use input area in settings panels to allow users to edit longer descriptions and titles.

```jsx
() => {
  const [value, setValue] = React.useState('');
  return (
    <SidePanel maxHeight="576px" width="288px" skin="floating">
      <SidePanel.Header title="Text Box Settings" />
      <SidePanel.Content noPadding>
        <SidePanel.Field>
          <FormField label="Description">
            <InputArea
              placeholder="This input area is great for longer descriptions with multiple lines of text."
              size="small"
              rows={3}
              maxLength={300}
              hasCounter
              resizable
              value={value}
              onChange={(e) => setValue(e.target.value)}
            />
          </FormField>
        </SidePanel.Field>
        <SidePanel.Field>
          <FormField label="What does the button do?">
            <SegmentedToggle size="small" defaultSelected="Open">
              <SegmentedToggle.Button value="Open">
                Expand
              </SegmentedToggle.Button>
              <SegmentedToggle.Button value="Closed">
                Link
              </SegmentedToggle.Button>
            </SegmentedToggle>
          </FormField>
        </SidePanel.Field>
        <SidePanel.Field>
          <FormField label="Link button text">
            <Input size="small" placeholder="Link to full article" />
          </FormField>
        </SidePanel.Field>
      </SidePanel.Content>
    </SidePanel>
  );
};
```

## Code

```jsx
import { InputArea } from '@wix/design-system';
```

### Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `ariaControls` | `string` | — | Associate a control with the regions that it controls. |
| `ariaDescribedby` | `string` | — | Associate a region with its descriptions. Similar to aria-controls but instead associating descriptions to the region and description identifiers are separated with a space. |
| `ariaLabel` | `string` | — | Define a string that labels the current element in case where a text label isn't visible on the screen. |
| `autoFocus` | `boolean` | — | Focus the element on mount (standard React input autoFocus). |
| `autoGrow` | `boolean` | — | Specifies whether area should grow and shrink according to user input. |
| `autoSelect` | `boolean` | — | Automatically selects the entire input text. |
| `backgroundColor` | `string` | — | Sets the background color of the input area. Accepts any CSS color value. |
| `children` | `InputAreaChildrenFnArgs` | — | Specifies custom textarea render function. |
| `dataHook` | `string` | — | Applies a data-hook HTML attribute that can be used in the tests. |
| `defaultValue` | `string` | — | Sets a default value for those who want to use this component un-controlled. |
| `dir` | `"rtl" \| "auto" \| "ltr"` | — | Specifies the text direction. Use "auto" to automatically determine direction based on content. |
| `disabled` | `boolean` | — | Specifies whether input should be disabled. |
| `enterKeyHint` | `"search" \| "enter" \| "done" \| "go" \| "next" \| "previous" \| "send"` | — | Sets the label of the virtual keyboard's enter key on touch devices. |
| `hasCounter` | `boolean` | — | Specifies whether character count is enabled. |
| `id` | `string` | — | Assigns an unique identifier for the root element. |
| `inputmode` | `string` | — | Sets the native `inputmode` attribute, which picks the virtual keyboard on touch devices. Supported values are `none`, `text`, `decimal`, `numeric`, `tel`, `search`, `email` and `url`. |
| `maxHeight` | `string` | — | Sets the maximum height of an area in pixels. |
| `maxLength` | `number` | — | Defines the maximum text length in number of characters. |
| `maxRowsAutoGrow` | `number` | — | Sets the maximum amount of rows the component can have in `autoGrow` mode. |
| `menuArrow` | `boolean` | — | Specifies whether input should have a dropdown menu arrow on the right side. |
| `minHeight` | `string` | — | Sets the minimum height of an area in pixels. |
| `minLength` | `number` | — | Defines the minimum text length in number of characters. |
| `minRowsAutoGrow` | `number` | `2` | Sets the minimum amount of rows the component can have in `autoGrow` mode. |
| `name` | `string` | — | Reference element data when a form is submitted. |
| `onBlur` | `FocusEventHandler` | — | Defines a standard input onBlur callback. |
| `onChange` | `ChangeEventHandler` | — | Defines a standard input onChange callback. |
| `onCompositionEnd` | `(event: CompositionEvent<HTMLTextAreaElement>) => void` | — | Defines a standard input onCompositionEnd callback. |
| `onCompositionStart` | `(event: CompositionEvent<HTMLTextAreaElement>) => void` | — | Defines a standard input onCompositionStart callback. |
| `onEnterPressed` | `KeyboardEventHandler<HTMLTextAreaElement>` | — | Defines a callback handler that is called when user presses enter. |
| `onEscapePressed` | `() => void` | — | Defines a callback handler that is called when user presses escape. |
| `onFocus` | `(e?: FocusEvent<HTMLTextAreaElement, Element> \| undefined) => void` | — | Defines a standard input onFocus callback. |
| `onKeyDown` | `KeyboardEventHandler<HTMLTextAreaElement>` | — | Defines a standard input onKeyDown callback. |
| `onKeyUp` | `KeyboardEventHandler<HTMLTextAreaElement>` | — | Defines a standard input onKeyUp callback. |
| `placeholder` | `string` | — | Sets a placeholder message to display. |
| `readOnly` | `boolean` | — | Specifies whether input is read only. |
| `ref` | `null \| string \| (instance: InputAreaComponent \| null) => void \| RefObject<InputAreaComponent>` | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). |
| `required` | `boolean` | — | Specifies whether the input area is a mandatory field. |
| `resizable` | `boolean` | — | Specifies whether area can be manually resized by the user. |
| `rows` | `number` | — | Sets initial height of an area to fit a specified number of rows. |
| `size` | `"small" \| "medium"` | — | Controls the size of the input. |
| `status` | `"error" \| "warning" \| "loading"` | — | Specifies the status of a field. |
| `statusMessage` | `ReactNode` | — | Defines the message to display on status icon hover. If not given or empty, no tooltip is displayed. |
| `tabIndex` | `number` | — | Indicates that element can be focused and where it participates in sequential keyboard navigation. |
| `tooltipPlacement` | `"right" \| "left" \| "top" \| "bottom" \| "auto" \| "auto-start" \| "auto-end" \| "top-start" \| "top-end" \| "right-start" \| "right-end" \| "bottom-end" \| "bottom-start" \| "left-end" \| "left-start"` | — | Controls placement of a status tooltip. |
| `value` | `string` | — | Defines input value. |

## Testkit

Import the driver matching your test environment:

```jsx
// UniDriver
import { InputAreaUniDriver } from '@wix/design-system/dist/testkit/unidriver';

// Vanilla
import { InputAreaTestkit } from '@wix/design-system/dist/testkit';

// Puppeteer
import { InputAreaTestkit } from '@wix/design-system/dist/testkit/puppeteer';

// Testing Library
import { InputAreaTestkit } from '@wix/design-system/dist/testkit/testing-library';
```

### Driver methods

| Method | Description |
| --- | --- |
| `trigger` | — |
| `focus` | — |
| `enterText` | — |
| `getValue` | — |
| `getName` | — |
| `getPlaceholder` | — |
| `getDefaultValue` | — |
| `getRowsCount` | — |
| `getMaxLength` | — |
| `getMinLength` | — |
| `getTabIndex` | — |
| `getReadOnly` | — |
| `getCursorLocation` | — |
| `getResizable` | — |
| `getDisabled` | — |
| `getRequired` | — |
| `getHasCounter` | — |
| `getCounterValue` | — |
| `hasExclamation` | — |
| `isFocusedStyle` | — |
| `isSizeSmall` | — |
| `isHoveredStyle` | — |
| `isFocus` | — |
| `exists` | — |
| `getStyle` | — |
| `getAriaLabel` | — |
| `getAriaControls` | — |
| `getAriaDescribedby` | — |
| `getTooltipDataHook` | — |
| `getTooltipElement` | — |
| `hasStatus` | Return true if there's a status |
| `getStatusMessage` | If there's a status message, returns its text value |
| `element` | Gets the component root element. |
| `click` | Clicks on the component root element. |
| `base` | Returns UniDriver for the base element. |

## Changelog

- **1.340.0** (2026-10-21) — maintenance release, no component-specific changes
- **1.339.0** (2026-10-19) — maintenance release, no component-specific changes
- **1.338.0** (2026-10-15) — maintenance release, no component-specific changes
- **1.331.0** (2026-10-01) — maintenance release, no component-specific changes
- **1.330.3** (2026-09-29) — maintenance release, no component-specific changes
- **1.330.0** (2026-09-28) — breaking: a single line is now exactly as tall as `Input` of the same `size` in every theme, so `autoGrow` and one-row fields line up with inputs next to them. Harmony (odeditor), Studio 2.0 (odeditor-dark) and Studio 2.0 Light (studio2-light) InputAreas get 4px shorter, Wixel 2px shorter at `medium`. ([#17198](invalid-url)) — has visual changes
- **1.329.0** (2026-09-24) — maintenance release, no component-specific changes
- **1.328.0** (2026-09-22) — maintenance release, no component-specific changes
- **1.326.0** (2026-09-17) — maintenance release, no component-specific changes
- **1.325.0** (2026-09-17) — maintenance release, no component-specific changes
- **1.323.0** (2026-09-10) — maintenance release, no component-specific changes
- **1.314.0** (2026-08-19) — fix: the `InputAreaState` type is now exported, so apps that wrap and re-export InputArea no longer fail their own declaration (`.d.ts`) builds with TS4023. ([#16846](invalid-url))
- **1.313.1** (2026-08-18) — fix: restored the `InputArea` type export used for typing refs (e.g. `useRef<InputArea>(null)`), which was lost when the component was wrapped with `withDefaultProps`. ([#16821](invalid-url))
- **1.312.0** (2026-08-14) — maintenance release, no component-specific changes
- **1.310.0** (2026-08-10) — maintenance release, no component-specific changes
- **1.295.0** (2026-07-03) — maintenance release, no component-specific changes
- **1.292.0** (2026-06-22) — maintenance release, no component-specific changes
- **1.291.0** (2026-06-19) — maintenance release, no component-specific changes
- **1.278.0** (2026-05-08) — maintenance release, no component-specific changes
- **1.273.0** (2026-04-30) — maintenance release, no component-specific changes
- **1.272.0** (2026-04-27) — maintenance release, no component-specific changes
- **1.270.0** (2026-04-20) — fix: added css property to manage overscroll behaviour ([#16159](invalid-url))
- **1.266.0** (2026-04-07) — maintenance release, no component-specific changes
- **1.260.0** (2026-03-17) — maintenance release, no component-specific changes
- **1.253.0** (2026-01-30) — feat: add minLength to InputArea ([#15881](invalid-url))
- **1.252.0** (2026-01-28) — fix: harmony dark extra row issue fixed ([#15879](invalid-url))
- **1.247.2** (2026-01-21) — maintenance release, no component-specific changes
- **1.232.0** (2025-11-28) — maintenance release, no component-specific changes
- **1.213.0** (2025-08-19) — maintenance release, no component-specific changes
- **1.212.0** (2025-08-11) — maintenance release, no component-specific changes
- **1.207.0** (2025-07-24) — maintenance release, no component-specific changes
- **1.203.0** (2025-07-01) — fix: tokenize InputArea placeholder ([#15021](invalid-url))
- **1.203.0** (2025-07-01) — feat: added dir prop ([#15029](invalid-url))
- **1.198.3** (2025-06-10) — maintenance release, no component-specific changes
- **1.183.0** (2025-04-24) — fix: rename semantic class name ([#14792](invalid-url))
- **1.175.1** (2025-04-01) — maintenance release, no component-specific changes
- **1.172.1** (2025-03-21) — maintenance release, no component-specific changes
- **1.166.0** (2025-03-04) — feat: expose onCompositionStart/onCompositionEnd ([#14577](invalid-url))
- **1.165.0** (2025-02-27) — maintenance release, no component-specific changes
- **1.138.1** (2024-10-30) — maintenance release, no component-specific changes
- **1.129.0** (2024-09-25) — maintenance release, no component-specific changes
- **1.124.0** (2024-09-06) — feat: add `maxRowsAutoGrow` prop ([#14078](invalid-url))
- **1.115.0** (2024-07-17) — maintenance release, no component-specific changes
- **1.114.0** (2024-07-11) — maintenance release, no component-specific changes
- **1.109.2** (2024-06-17) — maintenance release, no component-specific changes
- **1.102.0** (2024-04-16) — maintenance release, no component-specific changes
- **1.94.0** (2024-02-14) — feat: expose `calculateComputedRows` API method ([#13315](invalid-url))
- **1.92.1** (2024-02-05) — maintenance release, no component-specific changes