v1.2.0

TextField

Text fields let users enter and edit text. They come in three variants: outlined (default), filled, and standard.

Variants

<me-text-field variant="outlined" label="Outlined"></me-text-field> <me-text-field variant="filled" label="Filled"></me-text-field> <me-text-field variant="standard" label="Standard"></me-text-field>

With Placeholder

Types

Helper Text & Error

<me-text-field label="Email" helper-text="Enter your email"></me-text-field> <me-text-field label="Email" error helper-text="Invalid email address"></me-text-field>

Multiline

<me-text-field label="Message" multiline rows="4"></me-text-field>

Sizes

Disabled & Readonly

Adornments

<me-text-field label="Amount" start-adornment="$"></me-text-field> <me-text-field label="Weight" end-adornment="kg"></me-text-field>

Color

API

AttributeTypeDefaultDescription
variantoutlined | filled | standardoutlinedThe visual style variant.
labelstringThe floating label text.
valuestring""The input value.
typestringtextHTML input type (text, email, password, number, etc.)
placeholderstringPlaceholder text.
helper-textstringHelper or error text below the field.
errorbooleanfalsePuts the field in error state.
disabledbooleanfalseDisables the field.
readonlybooleanfalseMakes the field read-only.
requiredbooleanfalseRequired for form validation.
multilinebooleanfalseRenders a textarea instead of input.
rowsnumber4Number of rows for multiline.
sizesmall | mediummediumThe field size.
colorprimary | secondaryprimaryThe active/focus color.
start-adornmentstringText/icon shown before the input.
end-adornmentstringText/icon shown after the input.
namestringForm field name.
autocompletestringAutocomplete attribute passed to the input.

Events

EventDescription
inputFired on every keystroke.
changeFired when the value commits (blur or Enter).