Text area
React componentWrite longer content in a resizable multiline field.
Try it out
Use the live controls or open the Code tab to view and copy the example.
API reference
Generated from the package’s TypeScript exports. Standard React event and ARIA attributes are also accepted where the component wraps a native element.
| Prop | Type | Description |
|---|---|---|
onValueChange | ((value: string) => void) | undefined | Called with the next value. Update controlled state here. |
autoComplete | string | undefined | Standard React / HTML attribute passed to the underlying element. |
disabled | boolean | undefined | Disables interaction (or date matchers for DatePicker). |
maxLength | number | undefined | Standard React / HTML attribute passed to the underlying element. |
minLength | number | undefined | Standard React / HTML attribute passed to the underlying element. |
name | string | undefined | Field name used in form submission. |
placeholder | string | undefined | Standard React / HTML attribute passed to the underlying element. |
readOnly | boolean | undefined | Standard React / HTML attribute passed to the underlying element. |
required | boolean | undefined | Participates in native form validation. |
rows | number | undefined | Records to render. The library does not fetch data. |
value | string | number | readonly string[] | undefined | Controlled value. Pair with its change callback. |
onChange | ChangeEventHandler<HTMLTextAreaElement, HTMLTextAreaElement> | undefined | Standard React / HTML attribute passed to the underlying element. |
defaultChecked | boolean | undefined | Standard React / HTML attribute passed to the underlying element. |
defaultValue | string | number | readonly string[] | undefined | Initial value for uncontrolled usage. |
className | string | undefined | Additional CSS class names. |
id | string | undefined | Standard React / HTML attribute passed to the underlying element. |
style | CSSProperties | undefined | Inline styles, including CSS custom property overrides. |
rel | string | undefined | Standard React / HTML attribute passed to the underlying element. |
children | ReactNode | Content rendered inside the component. |
onFocus | FocusEventHandler<HTMLTextAreaElement> | undefined | Standard React / HTML attribute passed to the underlying element. |
onBlur | FocusEventHandler<HTMLTextAreaElement> | undefined | Standard React / HTML attribute passed to the underlying element. |
onError | ReactEventHandler<HTMLTextAreaElement> | undefined | Standard React / HTML attribute passed to the underlying element. |
onClick | MouseEventHandler<HTMLTextAreaElement> | undefined | Standard React / HTML attribute passed to the underlying element. |
labelRequired | string | A meaningful visible or accessible label. |
description | string | undefined | Supporting instructions associated with the control. |
error | string | undefined | Validation message; also sets aria-invalid. |
hideLabel | boolean | undefined | See the typed definition and working example for this option. |
Accessibility & interaction
Use a persistent visible label and provide textual errors; native controls support keyboard input and browser form constraints.
Visible focus, reduced motion, and both color themes are shared across staqui. Choose labels and document structure that make sense in your application; automated checks do not replace assistive-technology testing.
Variants & implementation notes
Native textarea with rows, min/maxLength and vertical resizing. Character counting is an application composition, shown in the example.
Use the typed API above for the supported variants. The example demonstrates the primary composition; shared controls inherit hover, focus, active and disabled treatment where applicable.