Skip to content
Star

PxInputText

A labeled text input primitive with built-in error/hint messaging and optional left/right icons. Supports text, password, email, number, search, tel, and url types.

Usage

Demo

Error & Hint States

Error & Hint

Username must be at least 3 characters.

This is shown publicly on your profile.

API Reference

PropTypeDefaultDescription
modelValue
string | number''The value of the input
label
stringThe label text
error
stringAn error message. Changes input to error state.
hint
stringHint text to display below the input
type
"text" | "password" | "email" | "number" | "search" | "tel" | "url"'text'Input type, defaults to text
disabled
booleanfalseNative disabled state
readonly
booleanfalseNative readonly state
required
booleanfalseMark field as required
iconLeft
ComponentLeft icon component
iconRight
ComponentRight icon component
placeholder
stringPlaceholder text
autocomplete
stringNative autocomplete attribute
min
string | numberNumber min
max
string | numberNumber max
step
string | numberNumber step
maxlength
string | numberMax length

Built with VitePress