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.
| Prop | Type | Default | Description |
|---|---|---|---|
value!! | string | undefined | undefined | Controlled value (use with !!). Leave undefined for uncontrolled. |
defaultValue | string | '' | |
placeholder | ResourceStr | '' | |
invalid | boolean | false | |
disabled | boolean | false | |
maxLength | number | undefined | undefined | |
maxHeight | number | undefined | undefined | Upper bound of the auto-growing height (vp); scrolls beyond it. |
showCount | boolean | false | Character counter at the bottom-right (length/maxLength). |
label | string | undefined | undefined | Accessible name when there is no visible label. |
modifier | AttributeModifier<TextAreaAttribute> | new SparkNoopModifier<TextAreaAttribute>() | |
tokens | InputTokens | {} | Per-instance token overrides (shares the --input-* theme tokens), see {@link InputTokens}. |
| Event | Type | Default | Description |
|---|---|---|---|
onValueChange | (v: string) => void | () => { } |