Props
| Name | Description |
|---|---|
append:icon Type: string | Name of the icon to be added at the end of the input. |
autocomplete Type: string | Guides to the browser as to the type of information expected in the field. |
autofocus Type: Booleanish | Focuses the field when it mounts (a dialog already open included), unless the user is typing in another field. |
autoGrow Type: booleanDefaultfalse | Expands the textarea to match its content. Empty, it is one BbTextInput tall (text on the same line); it never shrinks below that, or below Drops the native resize handle and grows the field to fit its content, animated through |
clearable Type: booleanDefaultfalse | Displays a clear button when the input has a value and is being interacted with. Same behaviour as on BbTextInput: no |
compact Type: booleanDefaultfalse | Compact density: the field uses the |
counter Type: booleanDefaultfalse | Shows a character count at the end of the hint row: |
description Type: string | Text between the label and the input. Unlike the hint it is always visible; it joins the input's |
disabled Type: booleanDefaultfalse | Disables the component. |
errors Type: string | string[] | Error messages under the field, a string or array, in an The home for a soft character limit: leave |
formless Type: booleanDefaultfalse | Keep this control out of the enclosing |
hasErrors Type: booleanDefaultfalse | Define if the component should be in an error state. It usually attaches a CSS class for styling purposes. |
hasWarnings Type: booleanDefaultfalse | Define if the component should be in a warning state. Same chrome as errors with |
hideLabel Type: booleanDefaultfalse | Visually hides the label of the input while maintaining accessibility. |
hint Type: string | Text box to be displayed near the input, usually to indicate instructions. See example |
id Type: string | The |
inputAlign Type: FieldCrossAlign | Vertical position of the control in a side-by-side row; not |
label requiredType: string | Text content of the label of the element. Required, and display and accessibility only: it does not set |
labelAlign Type: FieldCrossAlign | Vertical position of the label block in a side-by-side row; not |
labelMode Type: "outside" | "floating" | "inside" | Label rendering mode. Works exactly as on BbTextInput, including the |
labelPosition Type: "left" | "center" | "right" | Sets the text alignment of the label. |
layout Type: Responsive<FieldLayout> | How label and input sit together: Applies only while the resolved label mode is |
loading Type: booleanDefaultfalse | Sets the component in a loading state, usually triggering some visual styles. Visual only: the field stays editable during an autosave round-trip. See example |
modelValue Type: string | null | Used by v-model. |
name Type: string | Defines the name of the input. Unset, the rendered |
nullValue Type: E | What the field emits once the user empties it (typing it empty, the clear button): |
persistentHint Type: booleanDefaultfalse | Keeps the hint displayed. |
placeholder Type: string | Text shown while the field is empty. |
prepend:icon Type: string | Name of the icon to be added at the start of the input. |
pt Type: (PtMap<BbTextareaPtPart, BbTextareaPtState> & { "root:outline"?: PtValue | undefined; "icon:outline"?: PtValue | undefined; "root:secondary"?: PtValue | undefined; "icon:secondary"?: PtValue | undefined; "spinner:outline"?: PtValue | undefined; "spinner:secondary"?: PtValue | undefined; "clear:outline"?: PtValue | undefined; "clear:secondary"?: PtValue | undefined; "root:ghost"?: PtValue | undefined; "icon:ghost"?: PtValue | undefined; "spinner:ghost"?: PtValue | undefined; "clear:ghost"?: PtValue | undefined; "label:outline"?: PtValue | undefined; "label:secondary"?: PtValue | undefined; "label:ghost"?: PtValue | undefined; "description:outline"?: PtValue | undefined; "description:secondary"?: PtValue | undefined; "description:ghost"?: PtValue | undefined; "message:outline"?: PtValue | undefined; "message:secondary"?: PtValue | undefined; "message:ghost"?: PtValue | undefined; "hint:outline"?: PtValue | undefined; "hint:secondary"?: PtValue | undefined; "hint:ghost"?: PtValue | undefined; "input:outline"?: PtValue | undefined; "input:secondary"?: PtValue | undefined; "input:ghost"?: PtValue | undefined; "box:outline"?: PtValue | undefined; "box:secondary"?: PtValue | undefined; "box:ghost"?: PtValue | undefined; "prefix:outline"?: PtValue | undefined; "prefix:secondary"?: PtValue | undefined; "prefix:ghost"?: PtValue | undefined; "suffix:outline"?: PtValue | undefined; "suffix:secondary"?: PtValue | undefined; "suffix:ghost"?: PtValue | undefined; }) | Passthrough, object form: |
pt:<part> Type: PtValue | Passthrough, attribute form: one attribute per part, |
readonly Type: booleanDefaultfalse | Sets the input in a readonly state. |
required Type: booleanDefaultfalse | Sets the input as required. Outside a BbForm it forwards to the native textarea; inside one it only marks the field (asterisk, aria-required) and nothing enforces it: use |
reverse Type: booleanDefaultfalse | Reverses the layout. Applicable in every direction the order of the label and the input is swapped. |
rows Type: string | number | Sets the number of visible text lines for the control. On its own, a fixed height with the native resize handle. With |
rules Type: RuleExpression<string | null> | vee-validate rules for this field. Only inside a Read only inside a |
validationLabel Type: string | The field's name in validation messages ( |
validationMode Type: ValidationMode | When the field validates: |
variant Type: InputVariantTypeDefault'outline' | The field box's look, with |
warnings Type: string | string[] | Warning messages under the field, a string or array: amber, in their own |
v-model
Values kept in sync through v-model.
| Name | Description |
|---|---|
modelValue Type: string | null |
|
Events
| Name | Description |
|---|---|
blur Type: (event: FocusEvent): void | Emitted when the native textarea loses focus. Forwards the original DOM |
change Type: (event: Event): void | Emitted when the native textarea fires a change event. Forwards the original DOM |
click Type: (event: MouseEvent): void | Emitted when the textarea receives a click interaction. Forwards the original DOM |
compositionend Type: (event: CompositionEvent): void | An IME composition ended. Forwards the original DOM |
compositionstart Type: (event: CompositionEvent): void | An IME composition started. Forwards the original DOM |
focus Type: (event: FocusEvent): void | Emitted when the native textarea gains focus. Forwards the original DOM |
input Type: (event: Event): void | Emitted on native input events from the textarea. Forwards the original DOM Also |
keydown Type: (event: KeyboardEvent): void | Emitted for keyboard interaction on the textarea. Forwards the original DOM Forwarded, but not bubbled: the component calls |
keyup Type: (event: KeyboardEvent): void | Emitted for keyboard interaction on the textarea. Forwards the original DOM |
mousedown Type: (event: MouseEvent): void | Emitted when a pointing device button is pressed over the textarea. Forwards the original DOM |
mouseup Type: (event: MouseEvent): void | Emitted when a pointing device button is released over the textarea. Forwards the original DOM |
paste Type: (event: ClipboardEvent): void | Native clipboard paste. Forwards the original DOM |
update:modelValue Type: (value: string | NullValueOf<E>): void | Emitted when the value changes. Carries the new text, or the empty value ( |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Description |
|---|---|
append Type: Record<string, never> | Content rendered after the textarea, at the end of the inner container. |
append:outer Type: Record<string, never> | Content rendered after the entire textarea control, outside the input chrome. |
description Type: BbTextareaDescriptionSlotProps | Replaces the description text. Provided alone (no |
label Type: BbTextareaLabelSlotProps | Replaces the default label text rendered above the textarea. |
prefix Type: Record<string, never> | Inline content rendered at the start of the textarea field area, before the text. |
prepend Type: Record<string, never> | Content rendered before the textarea, at the start of the inner container. |
prepend:outer Type: Record<string, never> | Content rendered before the entire textarea control, outside the input chrome. |
suffix Type: Record<string, never> | Inline content rendered at the end of the textarea field area, after the text. The home for a character counter: beside the value rather than below it, where it would compete with the hint. See example |
Renamed and removed
Names from v2 and from earlier 3.0 betas that no longer work, and what to write instead.
- slot
append-outerappend:outerfails silently directionlayoutfails silentlyhasWarninghasWarningsfails silently- slot
prepend-outerprepend:outerfails silently validateOnvalidationModefails silentlyAn array of events became one mode (
aggressive|balanced|lazy|submit-only|submit-live). The old defaults (['blur'],['inactive'], a toggle's['update:modelValue', 'change', 'blur']) arebalanced, the new default: delete the prop. A text field on['update:modelValue']isvalidation-mode="aggressive". Set it once on<BbForm validation-mode>instead of per field.vidremovedfails silentlyA display name (v2:
vid="Email address") is nowvalidation-label; a field path (3.0 betas:vid="address.city") is nowname(brackets for a native post:address[city]).check --fixpicks by the value.