Textarea
A Shadcn textarea projected from the Base textarea protocol.
Ordinary demos on this page explicitly use Shadcn Rhea, with matching examples. This does not change public compatibility defaults or imply complete browser, native-host or visual acceptance. Neutral Surface/Text atoms retain their own public semantics; the consumer composition supplies the family presentation theme.
This entry shows the current shadcn textarea implementation in Proto UI.
Base Textarea owns the protocol: controlled and uncontrolled value, normalized input, change, and IME events, native properties such as rows, maxLength, and readOnly, accessibility projection, and focus and blur. It materializes exactly one host-owned multiline editor, and the shadcn layer adds presentation only — field dimensions, border, focus ring, and the disabled treatment.
The projection is contentless. Authored children never become a second editor, and the slice adds no form workflow, validation message, auto-resize, or rich-text behavior.
The demo is three editors: an uncontrolled note (rows 4, maxLength 240), a disabled editor, and a read-only editor that remains focusable.
Install
Section titled “Install”
npx @proto.ui/cli@latest add wc shadcn-textarea
Replace wc with react, vue or vue2 to generate the facade for that host.
Passing value selects controlled mode. minLength and maxLength use -1 when the limit is omitted.
| Prop | Type | Default |
|---|---|---|
value | string undefined | uncontrolled |
defaultValue | string | '' |
disabled | boolean | false |
readOnly | boolean | false |
placeholder | string | '' |
rows | number | 2 |
required | boolean | false |
name | string | '' |
autoComplete | string | '' |
minLength | number | -1 |
maxLength | number | -1 |
wrap | 'soft' 'hard' | soft |
ariaLabel | string | '' |
labelledBy | string | '' |
describedBy | string | '' |
Root exposes value, disabled, readOnly, focused, focusVisible, and composing, plus valueChange, change, and the composition events. Authored children are not a second editor.