# @askrjs/ui/textarea

> Published API exports for @askrjs/ui/textarea.

Source: [https://askrjs.com/docs/reference/api/ui/textarea](https://askrjs.com/docs/reference/api/ui/textarea)

Status: stable. Packages: @askrjs/ui/textarea.

**Published packages are authoritative.** Examples may lag behind a published contract. When guidance differs, verify the exports and TypeScript declarations in your installed package, then file an issue.

## Exports

This entrypoint publishes 7 exports from the declarations shipped by @askrjs/ui.

### `Textarea`

```ts
Textarea: { (props: TextareaElementProps): JSX.Element; (props: TextareaAsChildProps): JSX.Element; }
```

Renders the `textarea` part of `textarea`.

Supports polymorphic rendering via `asChild`.

### `TEXTAREA_A11Y_CONTRACT`

```ts
TEXTAREA_A11Y_CONTRACT: { readonly HOST_ELEMENT: "textarea"; readonly DISABLED_ATTRIBUTES: { readonly native: "disabled"; readonly asChild: "disabled"; }; readonly DATA_ATTRIBUTES: { readonly disabled: "data-disabled"; }; readonly FOCUS_RULES: { readonly defaultTabIndex: 0; readonly disabledTabIndex: -1; }; readonly LABELING: { readonly supportsLabelElement: true; readonly supportsAriaLabel: true; readonly supportsAriaLabelledBy: true; }; }
```

Native textarea semantics wrapped by askr-ui Textarea.

### `TextareaA11yContract`

```ts
TextareaA11yContract: typeof TEXTAREA_A11Y_CONTRACT
```

Type of the Textarea A11y Contract object.

### `TextareaAsChildProps`

```ts
TextareaAsChildProps: TextareaOwnProps & {
  asChild: true;
  children: JSXElement;
  ref?: Ref<Element>;
}
```

Props for the `asChild` (polymorphic) rendering of Textarea.

- `asChild`: asChild: true;

- `children`: children: JSXElement;

- `disabled`: disabled?: boolean | undefined;

- `ref`: ref?: Ref<Element>;

- `tabIndex`: tabIndex?: number | undefined;

### `TextareaElementProps`

```ts
TextareaElementProps: Omit<JSX.IntrinsicElements['textarea'], 'children' | 'ref'> & TextareaOwnProps & {
  asChild?: false;
  ref?: Ref<HTMLTextAreaElement>;
}
```

Props for Textarea Element.

- `asChild`: asChild?: false | undefined;

- `children`: children?: unknown;

- `ref`: ref?: Ref<HTMLTextAreaElement>;

### `TextareaOwnProps`

```ts
TextareaOwnProps: {
  children?: unknown;
  disabled?: boolean;
  tabIndex?: number;
}
```

Own props for Textarea, before merging with native element attributes.

- `children`: children?: unknown;

- `disabled`: disabled?: boolean | undefined;

- `tabIndex`: tabIndex?: number | undefined;

### `TextareaProps`

```ts
TextareaProps: TextareaElementProps | TextareaAsChildProps
```

Props for Textarea.

- `asChild`: asChild?: boolean | undefined;

- `children`: children?: unknown;

- `ref`: ref?: ((value: Element | null) => void) | { current: Element | null; } | ((value: HTMLTextAreaElement | null) => void) | { current: HTMLTextAreaElement | null; } | null | undefined;

## Documentation navigation

[Previous](https://askrjs.com/docs/reference/api/ui/virtual-table/index.md) | [Next](https://askrjs.com/docs/reference/api/ui/toggle/index.md)
