Skip to content

Input โ€‹

A single-line text input with sizes, color and visual variants, validation states, prefix/suffix slots and a clearable button. Toggle Vue / CSS to switch the live demo and source together.

Basic โ€‹

Default text input with label, placeholder and helper text.

Vue SFC

Types โ€‹

text, email, password, number, tel, url, date, time and search.

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

Prefix & suffix โ€‹

Icon or text on either side of the native input.

Vue SFC

Clearable โ€‹

Clear button shown when the value is non-empty.

Vue SFC

Event log โ€‹

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

Vue SFC

Customized โ€‹

Override per-element styling with the cssClass prop (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 ("260px", "80%") or a number (px). Fields are full width by default; set width to constrain.

Vue SFC

Types โ€‹

Importimport { InputProps } from 'mono-helper'
PropValueDefaultDescription
type'number' | 'date' | 'time' | 'text' | 'email' | 'password' | 'tel' | 'url' | 'month' | 'week' | 'search''text'Native input type controlling the field's behavior and keyboard.
size'sm' | 'md' | 'lg''md'Visual size of the input field.
color'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info''primary'Theme color applied to focus, borders, and accents.
variant'underlined' | 'outlined' | 'filled''outlined'Visual style of the field (outlined, filled, or underlined).
placeholderstring''Placeholder text shown when the field is empty.
valuestring | number''Current input value.
namestring''Form field name submitted with the input.
modelValuestring''Two-way bound value for v-model-style usage.
disabledbooleanfalseDisables interaction and dims the field.
readonlybooleanfalseMakes the field read-only while still focusable.
clearablebooleanfalseShows a clear button when the field has a value.
requiredbooleanfalseMarks the field as required and shows a required indicator.
autofocusbooleanfalseFocuses the field automatically on first render.
labelstring''Label text displayed above the field.
helperTextstring''Helper text shown below the field.
validationState'warning' | 'default' | 'valid' | 'invalid''default'Explicit validation state for styling and messaging.
validationMessagestring''Validation message shown below the field.
errorbooleanfalseMarks the field in an error state.
errorMessagestring''Error message shown below the field.
successbooleanfalseMarks the field in a success state.
successMessagestring''Success message shown below the field.
ariaLabelTextstringโ€”Accessible label for the input element.
ariaLabelstringโ€”Shorter alias for the accessible label.
minLengthnumberโ€”Minimum allowed input length.
maxLengthnumberโ€”Maximum allowed input length.
minstring | numberโ€”Minimum value for numeric or date inputs.
maxstring | numberโ€”Maximum value for numeric or date inputs.
stepstring | numberโ€”Step increment for numeric or date inputs.
patternstring''Validation pattern the value must match.
autocompletestring''Native autocomplete hint for the field.
inputmodestring''Native inputmode hint for the on-screen keyboard.
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โ€”โ€”
cssClassInputCssClass{}Per-part class overrides for internal elements.