Text area

Multi-line entry, with an optional character counter and a drag handle. Hover the field to see the hover state. It is a real pointer state, not a pill.

Drag the corner to resize. The counter is yours to cap.
<Textarea
  size="md"
  label="Input area"
  required
  info="We only use this to improve the product."
  maxLength={200}
  hint="Drag the corner to resize. The counter is yours to cap."
/>

Sizes

Three, on the shared size scale.

sizeHeightRadiusNotes
sm113px8pxFigma X-Small.
md127px12pxFigma Small. The default.
lg141px12pxFigma Medium.

Props

PropTypeDefaultNotes
requiredbooleanfalseRenders the asterisk and sets aria-required.
optionalbooleanfalseRenders the muted "(Optional)" note.
infostring—Adds an info marker after the label, with this as its tooltip.
maxLengthnumber—Caps the value and turns the counter on.
showCounterbooleanautoOn whenever maxLength is set. Pass false to hide it.
resizablebooleantrueShow the drag handle that resizes the field.

Shared

PropTypeDefaultNotes
valuestring—Controlled value.
defaultValuestring—Initial value when uncontrolled.
onChange(value: string) => void—Receives the value, never the event.
labelReactNode—Rendered as a real <label> wired by htmlFor.
hintReactNode—Helper text under the field.
errorReactNode—Error text. Implies invalid unless invalid says otherwise.
invalidboolean—Forces the error styling on or off.
errorKeystring | number—Change it to replay the error animation.
disabledbooleanfalseGreys the field out.
readOnlybooleanfalseReads as filled, stays focusable.
size'sm' | 'md' | 'lg''md'Size scale, where the component defines one.
classNamesRecord<Part, string>—Per-part class names.

Resizing

The handle is a real drag, not the browser's native resize, which draws its own corner widget on top of the mark and only works from the bottom-right corner. Dragging writes to --yote-ta-height, which means you can set the same property yourself to pick a starting height.

<Textarea
  label="Input area"
  style={{ '--yote-ta-height': '200px' }}
/>

Custom properties

Every measured value is a property on the root, so one field can be retuned without a stylesheet.

PropertyControls
--yote-ta-heightField height. The drag handle writes to this one.
--yote-ta-radiusCorner radius.
--yote-ta-pad-yVertical padding.
--yote-ta-pad-leftLeft padding.
--yote-ta-pad-rightRight padding. Tighter than the left, to sit the handle near the edge.