Skip to content

Textarea โ€‹

A multi-line text input with sizes, color and visual variants, validation states, slot-overridable label and helper, JS-driven auto-resize, and an optional character counter. Toggle Vue / CSS to switch the live demo and source together.

Basic โ€‹

Default textarea with label, placeholder and helper text.

Vue SFC

Sizes โ€‹

Small, medium and large.

Vue SFC

Variants โ€‹

outlined, filled and underlined.

Vue SFC

Colors โ€‹

All built-in color variants.

Vue SFC

States โ€‹

Disabled, readonly and required.

Vue SFC

Validation โ€‹

valid, invalid and warning states with messages.

Vue SFC

Auto resize โ€‹

Grow with content between min-rows and max-rows.

Vue SFC

Counter โ€‹

Live character count via show-counter and max-length.

Vue SFC

Slots โ€‹

Custom label and helper content via named slots.

Vue SFC

Event log โ€‹

Live log of mno-input and mno-change events.

Vue SFC

Customized โ€‹

Override per-element styling with cssClass (Vue) or extra utility classes (CSS).

Vue SFC

Width & height โ€‹

Set width, height, min-width, max-width, min-height or max-height โ€” each takes a CSS string ("320px", "80%") or a number (px). Fields are full width by default; set width to constrain.

Vue SFC

Types โ€‹

Importimport { TextareaProps } from 'mono-helper'
PropValueDefaultDescription
modelValuestring''Two-way bound text value of the textarea.
valuestring''Text value (kept in sync with modelValue).
namestring''Form field name for the underlying textarea.
placeholderstring''Placeholder text shown when empty.
labelstring''Text label shown above the textarea.
helperTextstring''Helper text shown below the textarea.
validationState'warning' | 'default' | 'valid' | 'invalid''default'Validation state controlling field styling.
validationMessagestring''Message shown for the current validation state.
errorMessagestring''Error message that forces the invalid state.
successMessagestring''Success message that forces the valid state.
size'sm' | 'md' | 'lg''md'Size of the textarea.
color'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info''primary'Color theme of the textarea.
variant'underlined' | 'outlined' | 'filled''outlined'Visual style of the textarea.
disabledbooleanfalseDisables interaction with the textarea.
readonlybooleanfalseMakes the textarea read-only.
requiredbooleanfalseMarks the field as required.
autofocusbooleanfalseFocuses the textarea on first render.
autoResizebooleanfalseAutomatically grows the height to fit content.
rowsnumberโ€”Initial number of visible text rows.
minRowsnumberโ€”Minimum number of rows when auto-resizing.
maxRowsnumberโ€”Maximum number of rows when auto-resizing.
minLengthnumberโ€”Minimum allowed character length.
maxLengthnumberโ€”Maximum allowed character length.
showCounterbooleanfalseShows a character counter below the field.
ariaLabelTextstringโ€”Accessible label for screen readers.
ariaLabelstringโ€”โ€”
widthstring | numberโ€”Explicit sizing. Each accepts a CSS length string (`"320px"`, `"80%"`) or a number (interpreted as px). Use `width="100%"` for a full-width field.
heightstring | numberโ€”โ€”
minWidthstring | numberโ€”โ€”
maxWidthstring | numberโ€”โ€”
minHeightstring | numberโ€”โ€”
maxHeightstring | numberโ€”โ€”
cssClassTextareaCssClass{}Per-part class overrides for styling internal elements.