Components

BaseTextField

The text field of every form, with a visible label, the optional marker, hints, errors and help.

components/ui/inputs/BaseTextField.vue
View in the demo

States

Icons, prefixes and help

$USD

Validation

Rules come from useFormRules() and the submit from useFormSubmit(). Submit the empty form to see the error, then type a valid email.

The Forms guide explains rules, server errors and submit states in detail.

API

It also accepts every prop, slot and event of v-text-field, which it passes through.

Props

Name
Type
Default
Description
labelstring—The visible label above the field, linked to it with for and aria-labelledby.
input-idstring—A fixed id for the input. One is generated with useId() when you leave it out.
optionalboolean—Adds “(optional)” after the label. Never mark required fields.
infoBaseInputInfo—A help popover next to the label: a text or a list of { title, text }.

Slots

Name
Slot props
Description
#label-append—Content at the end of the label row, such as a “Forgot it?” link.

The look of every field comes from useInputStyles() (variant, density, radius and colour). Change it there to restyle all of them at once.

Accessibility

The label is always visible and linked to the input. Error messages are announced through aria-describedby and the field gets aria-invalid. Set type, inputmode and autocomplete so phones show the right keyboard and browsers can autofill.

© 2026 melsami UI.
Developer documentation for melsami UI.