Textarea
A multi-line text field with the same border and focus ring as Input.
Default
Same border and focus ring as Input, so a form reads as one control set.
Usage
import { Textarea } from '@oceanic-hub/brand-system'Reach for it the moment an answer might run past one line — a release note, a
cancellation reason, an incident summary. Input is the one-line sibling; the choice is the
content's own shape, not a size preference, since neither grows into the other. rows sets
the starting height and the field resizes vertically only — there is no autoSize/maxRows
prop, because measuring the box to grow it is behaviour a package that ships source with no
runtime of its own does not own. A surface that genuinely needs autosize implements that itself
over the shipped resize-y plus a min-height.
Compose it inside Field for a label, an id wired to htmlFor, and help text below it —
the same layout Input already composes into, so a form mixing single- and multi-line
controls reads as one system rather than two conventions. A bare Label (the demo below) is
enough when there is nothing else to say; reach for Field the moment the control needs a
sentence of help or a validation state.
aria-invalid turns the border solid stuck — the same rule Input carries, because a
textarea and an input in one form must not disagree about what wrong looks like (@OCE-1877). A
wrapping Field with data-invalid paints the same line, so the two routes agree rather than
compete. The border is still only half of it: upstream's Invalid example is ported COMPOSED,
inside a Field, because a line can say that something is wrong and only FieldError can say
what.
Not shown: a character counter. Nothing in this component measures its own value, and a counter that only sometimes appears is a worse signal than none — a surface that wants one composes it itself from the value it already holds.
Disabled
disabled dims the field to 40% and blocks interaction — the same treatment every control in the package uses, so a form reads as one system when several fields disable together.
In a field
Field supplies the label, an id wired to htmlFor, and help text below the control — the same layout Input composes into, so a form mixing both reads as one system.
Invalid
aria-invalid turns the border solid stuck on the control itself, and a Field marked data-invalid paints the same line — so the two agree rather than compete. Composed here because the border says something is wrong and only FieldError says what.
With a button
A composer pairs the field with an action rather than a form submit — Enter still inserts a newline, so sending stays a deliberate click, never a keybinding this component defines itself.
API Reference
See the Textarea API page for every prop of every part, with types, defaults and the contract that pins them.