Skip to content

Textarea ​

Use bo-textarea for multi-line values with labels, helper text, validation, and optional resizing.

Usage ​

<bo-textarea>
  v-model="message"
  label="Message"
  placeholder="Write a message..."
  :rows="4"
/>

States ​

Use description, hint, and error for field messaging. Set state="invalid" with an error.

Keep it short.
Comment is required.
<div class="grid gap-3">
  <bo-textarea label="Description" description="Keep it short." />
  <bo-textarea label="Comment" state="invalid" error="Comment is required." />
</div>

Sizing ​

The default is four rows and non-resizable. Use rows, height, max-height, expand, and resizable as needed.

<bo-textarea label="Notes" :rows="3" resizable />

API ​

Prop / eventTypeDefaultDescription
id / dataTestIdstringautogeneratedTextarea attributes.
modelValuestring''Text used by v-model.
label / description / error / hintstring-Field messaging.
statedefault | valid | invaliddefaultValidation appearance.
variantdefault | filleddefaultSurface treatment.
placeholder / namestring-Empty hint and native form name.
rows / maxLengthnumber4 / -Visible rows and character limit.
resizable / expand / fullWidthbooleanfalseSizing behavior.
height / maxHeightnumber | string-CSS dimensions.
required / disabled / readOnly / autofocusbooleanfalseNative textarea states.
prefixIcon / suffixIconIcon-Icons around the textarea.
role / ariaLabel / ariaDescribedBy / ariaInvalidnative accessibility types-Textarea semantics.
update:modelValue(value: string) event-Emitted when the text changes.
focus / blur / changenative component events-Emitted from the textarea.
focusexposed method-Focuses the native textarea.

Released under the MIT License.