Textarea
A box for several lines of text.
import { Textarea } from "@dede-style/ui/textarea", then <Textarea value={v} onChange={setV} />. It is controlled: pass the text in value, and onChange gives you the new text as a string. Put it in a Field to give it a label.
| Prop | Description | Default | Control |
|---|---|---|---|
| value | the text. Controlled: pass it with onChange | ||
| rows | the height in lines: 2, 3 (default), 4, 5, 6 or 8. It is also the smallest the box can be dragged to234568 | 3 |
|
| resize | vertical (default) lets the person drag the box taller; none removes the drag handle. Never sidewaysverticalnone | vertical | |
| auto | grows the box as the person types, from rows up. Works in Chrome and Edge 123+, Safari 26.2+ and Firefox 152+; older browsers keep the rows height and the drag handle | false | |
| variant | frame (default) draws the box; plain has no box, only the focus ringframeplain | frame | |
| size | the text size and padding of a TextInput of this size (32, 40 or 48px), so the two line up in a form. The height comes from rows81012 | 10 |
|
| placeholder | an example of what to write, shown until something is typed. Not a label | ||
| required | requires a value before the form submits. No asterisk is shown; mark optional fields in their label | false | |
| disabled | disables the field and dims it. Prefer readOnly when the text should still be read or copied | false | |
| read | the text can be read, selected and copied, and is submitted, but not edited | false | |
| max | the most characters allowed. There is no counter |
Tokens
What a theme can move, where the props above are what an instance can move.
| Token | Description | Value |
|---|---|---|
| --text-input-radius | the corner. It is TextInput’s token, because a Textarea uses TextInput’s box. Changing it changes the corners of TextInput, Select and Textarea together, so they match in a form | --radius-4 |
A token appears here only when the value is not already reachable. Anything that resolves through a foundation token or a role needs none, because overriding that already moves it — and a second dial wired to the same value would let this one component drift from everything sharing the role. What is left is the values with no other lever at all.
These are public and overridable — there is no private custom property, because anything on :root is reachable by any stylesheet. What replaces privacy is a stability contract: primitives may move, roles are the guarantee, and these are the per-component escape from both.