Skip to content

Textarea ​

Displays a form textarea. It grows with its content (min-h-16); cap it with maxHeight.

Usage ​

Approximate web preview — the HarmonyOS rendering is the reference.

Character counter ​

showCount draws length/maxLength in the corner.

Approximate web preview — the HarmonyOS rendering is the reference.

API ​

Extracted from the @Param / @Event / @BuilderParam declarations in the library sources.

STextarea ​

shadcn-vue Textarea: min-h-16 w-full rounded-md border px-3 py-2 text-sm field-sizing-content on the native TextArea — it grows with its content (cap it with maxHeight).

modifier styles the inner TextArea.

PropTypeDefaultDescription
value!!string | undefinedundefinedControlled value (use with !!). Leave undefined for uncontrolled.
defaultValuestring''
placeholderResourceStr''
invalidbooleanfalse
disabledbooleanfalse
maxLengthnumber | undefinedundefined
maxHeightnumber | undefinedundefinedUpper bound of the auto-growing height (vp); scrolls beyond it.
showCountbooleanfalseCharacter counter at the bottom-right (length/maxLength).
labelstring | undefinedundefinedAccessible name when there is no visible label.
modifierAttributeModifier<TextAreaAttribute>new SparkNoopModifier<TextAreaAttribute>()
tokensInputTokens{}Per-instance token overrides (shares the --input-* theme tokens), see {@link InputTokens}.
EventTypeDefaultDescription
onValueChange(v: string) => void() => { }

MIT Licensed