BetaPublic beta — Read the release notes
Documentation

Textarea

Native textarea primitive with validation states and optional auto-resizing.

Package
@solidiom/textarea
Version
0.6.0
Status
stable

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?
string
defaultValue?
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 | CSSProperties
value?
string — Current value (controlled).

View source

TextareaRootPropsinterface

Props for the standalone textarea root.

Props

autoResize?
boolean — Resize to fit its content. Defaults to false.
class?
string
defaultValue?
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 | CSSProperties
value?
string — Current value (controlled).

View source