Skip to content
On this page

Input

Basic

You can use AInput component to render basic input.

Placeholder

You can use placeholder attribute to add placeholder to the input.

Label

You can use label prop to add label to the input.

For maximum flexibility you can use label slot.

WARNING

When you use label slot, Note that label's for attribute needs to prefix the a-input- when binding it to input's id attribute.

Hint

You can use hint prop to add hint to the input.

Your email will be confidential

Icons

You can use various icon location prop to add icon to the input.

We never share your email with anyone

Sizing

You can use font-size utility to adjust the size of input.

TIP

Like AInput, ASelect & ATextarea also built on top of ABaseInput base component. Hence, This demo also applies to ASelect & ATextarea.

Roundness

You can adjust input roundness by providing border-radius utilities to input-wrapper-classes prop.

TIP

Like AInput, ASelect & ATextarea also built on top of ABaseInput base component. Hence, This demo also applies to ASelect & ATextarea.

Types

You can use type attribute to add input type.

States

You can use readonly prop to make input read only.

Use disabled prop to make input disabled.

Validation

Anu do not provide any validation mechanism at the moment as it assume it's better handled by third-party libraries like VeeValidate

Error message will get displayed here

API

Input

disabled : boolean

Set component in disabled state

readonly : boolean

Set component in readonly mode

loading : boolean

Set loading state

appendIcon : string

Append icon

modelValue : string | number
inputWrapperClasses : any

Input wrapper classes

inputClasses : any

Input classes

inputWrapperAttrs : HTMLAttributes

Input wrapper attributes

hint : string

Add hint below the form component

error : string

Error text to render. This will replace hint text if provided.

label : ConfigurableValue

Label of the form component

prependIcon : string

Prepend icon

prependInnerIcon : string

Prepend icon inside input

appendInnerIcon : string

Append icon inside input

bottom : any
label : any
prepend : any
prepend-inner : any
append-inner : any
append : any
update:modelValue => [value: string | number | undefined]

Released under the MIT License.