MigsLab UIVue 3 component workshop

Form

Input

A single-line text or number field. Native attributes such as placeholder, disabled and name pass straight through to the <input>.

import { InputComponent } from '@/MigsLab/shared'

Text

Value: —
<InputComponent v-model="name" placeholder="Your name" />

Numeric with min / max

type="numeric" emits numbers. The value is clamped to min / max when the field is committed (blur or Enter).

Value: 8 (number)
<InputComponent v-model="quantity" type="numeric" :min="1" :max="99" />

Variants

<InputComponent v-model="value" rounded />
<InputComponent v-model="value" hover-border />
<InputComponent v-model="value" type="password" />
<InputComponent v-model="value" disabled />

API

Props

NameType Default Description
v-modelstring | number''Field value. Numeric fields emit a number, or an empty string when cleared.
type'text' | 'numeric' | 'password' | 'email' | 'search' | 'tel' | 'url''text'Input type; numeric renders a number input.
min / maxnumberundefinedBounds for numeric inputs, applied on change.
roundedbooleanfalsePill-shaped field.
hoverBorderbooleanfalseBorder is hidden until hover or focus — good for inline editing.