Textarea
Native textarea primitive with validation states and optional auto-resizing.
Generated from the package's public source.
API
Rootcomponent
Root(props: TextareaRootProps): Element
Props
autoResize?boolean— Resize to fit its content. Defaults to false.class?stringdefaultValue?string— Initial value (uncontrolled).disabled?boolean— Whether the textarea is disabled.invalid?boolean— Whether the textarea is invalid.maxRows?number— Maximum number of visible text rows while auto-resizing.onBlur?FocusEventHandlerUnion<HTMLTextAreaElement, FocusEvent>onFocus?FocusEventHandlerUnion<HTMLTextAreaElement, FocusEvent>onInput?InputEventHandlerUnion<HTMLTextAreaElement, InputEvent>onValueChange?(value: string) => void— Called with the native value whenever the textarea receives input.readonly?BooleanAttribute— Native lowercase readonly attribute.readOnly?boolean— Whether the textarea is read-only.ref?Ref<HTMLTextAreaElement>— Forwarded native textarea ref.required?boolean— Whether the textarea is required.style?string | CSSPropertiesvalue?string— Current value (controlled).
TextareaRootPropsinterface
Props for the standalone textarea root.
Props
autoResize?boolean— Resize to fit its content. Defaults to false.class?stringdefaultValue?string— Initial value (uncontrolled).disabled?boolean— Whether the textarea is disabled.invalid?boolean— Whether the textarea is invalid.maxRows?number— Maximum number of visible text rows while auto-resizing.onBlur?FocusEventHandlerUnion<HTMLTextAreaElement, FocusEvent>onFocus?FocusEventHandlerUnion<HTMLTextAreaElement, FocusEvent>onInput?InputEventHandlerUnion<HTMLTextAreaElement, InputEvent>onValueChange?(value: string) => void— Called with the native value whenever the textarea receives input.readonly?BooleanAttribute— Native lowercase readonly attribute.readOnly?boolean— Whether the textarea is read-only.ref?Ref<HTMLTextAreaElement>— Forwarded native textarea ref.required?boolean— Whether the textarea is required.style?string | CSSPropertiesvalue?string— Current value (controlled).