AnyLumino
API referenceastryxinputs

TextArea

Render a multiline Astryx text area.

Astryx Props

JSON-safe TextArea props forwarded to Astryx.

Supported Astryx props include:

  • ref (React.Ref<HTMLTextAreaElement>): Ref forwarded to the underlying <textarea> element.
  • label (string; required): Label text for the textarea. Always rendered for accessibility.
  • value (string; required): Current value of the textarea.
  • onChange ((value: string, e: ChangeEvent<HTMLTextAreaElement>) => void): Callback fired when the textarea value changes.
  • changeAction ((value: string, e: ChangeEvent<HTMLTextAreaElement>) => void or Promise<void>): Async action fired after onChange inside a React transition. Enables optimistic updates via useOptimistic.
  • isLabelHidden (boolean): Visually hides the label while keeping it accessible to screen readers.
  • description (string): Helper text displayed between the label and textarea.
  • isOptional (boolean): Displays an "Optional" indicator next to the label. Mutually exclusive with isRequired.
  • isRequired (boolean): Displays a "Required" indicator next to the label and sets aria-required. Mutually exclusive with isOptional.
  • isDisabled (boolean): Disables the textarea, preventing interaction.
  • isLoading (boolean): Puts the textarea in a loading state, showing a spinner inside the input.
  • placeholder (string): Placeholder text shown when the textarea is empty.
  • rows (number): Number of visible text rows.
  • maxLength (number): Maximum number of characters allowed. When set, a character counter (current/max) is displayed below the textarea. Does not enforce the limit natively; the counter shows error styling when exceeded.
  • status ({ type: 'warning' or 'error' or 'success'; message?: string }): Status indicator that applies a colored border and icon. An optional message is displayed in a floating box below the textarea.
  • labelTooltip (string): Tooltip text displayed in an info icon at the end of the label.
  • startIcon (IconType): Icon component rendered inside the leading edge of the textarea wrapper. See 'npx astryx docs icons' for valid semantic names.
  • hasSpellCheck (boolean): Enables or disables browser spell checking.
  • hasAutoFocus (boolean): Automatically focuses the textarea on mount.
  • size ('sm' or 'md' or 'lg'): Size of the textarea, affecting internal padding. Height is controlled by rows, not size.
  • onPaste ((e: ClipboardEvent<HTMLTextAreaElement>) => void): Callback fired when content is pasted into the textarea.
  • htmlName (string): HTML name attribute for the textarea element, useful for form submissions.
  • onFocus ((e: FocusEvent<HTMLTextAreaElement>) => void): Callback fired when the textarea receives focus.
  • onBlur ((e: FocusEvent<HTMLTextAreaElement>) => void): Callback fired when the textarea loses focus.
  • xstyle (StyleXStyles): StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object like style={{}}.

Props typed as React nodes, render functions, event handlers, refs, or StyleX styles are documented for Astryx parity but cannot be serialized directly from Python unless the wrapper adapts them.

See Astryx component docs: https://astryx.atmeta.com/components/TextArea.

Functions

constructor__init__(value='', *, label='', placeholder='', rows=3, disabled=False, size=None, label_hidden=None, description=None, optional=None, required=None, loading=None, max_length=None, spell_check=None, status=None, **props) -> None
paramvaluestr
= ''

Synchronized component value.

paramlabelstr
= ''

Visible or accessible label for the component.

paramplaceholderstr
= ''

Placeholder text shown when the control is empty.

paramrowsint
= 3

Rows or records rendered by the component.

paramdisabledbool
= False

Whether the component should render disabled.

paramsizestr | None
= None

Text-area size.

paramlabel_hiddenbool | None
= None

Whether to visually hide the accessible label.

paramdescriptionstr | None
= None

Helper text displayed with the input.

paramoptionalbool | None
= None

Whether to mark the field optional.

paramrequiredbool | None
= None

Whether to mark the field required.

paramloadingbool | None
= None

Whether to show the loading state.

parammax_lengthint | None
= None

Maximum length used by the character counter.

paramspell_checkbool | None
= None

Whether browser spell checking is enabled.

paramstatusMapping[str, Any] | None
= None

Validation status record.

parampropsAny
= {}

Returns

None

On this page