Textarea

@sushindustries/ui

A textarea in the same clothes as Input, growing with its content where the browser allows.

4 min read
View as MarkdownEdit on GitHub

Composing it

TextareaTextareaA textarea in the same clothes as Input, growing with its content where the browser allows.@sushindustries/ui · content already carries field-control field-textarea - any className passed in is appended, not swapped in, so a caller only ever adds to the control's look rather than needing to reconstruct it. Pair it with FieldFieldA labelled control with one line under it - the error is announced by being pointed at, not by being red.@sushindustries/ui · content for a label, a hint or an error state; TextareaTextareaA textarea in the same clothes as Input, growing with its content where the browser allows.@sushindustries/ui · content on its own is the control alone, the same as InputInputA text input, and only the drawing of one - state and labels belong to the form and to Field.@sushindustries/ui · content.

When not to use it

For a single line of free text, InputInputA text input, and only the drawing of one - state and labels belong to the form and to Field.@sushindustries/ui · content is the right size - TextareaTextareaA textarea in the same clothes as Input, growing with its content where the browser allows.@sushindustries/ui · content's growing behaviour and taller minimum height cost vertical space a one-line field does not need. Reach for this one when the content is genuinely multi-line: a message, a description, anything where the number of lines isn't known ahead of time.