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.
Icons
You can use various icon location prop to add icon to the input.
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
API
Set component in disabled state
Set component in readonly mode
Set loading state
Append icon
Input wrapper classes
Input classes
Input wrapper attributes
Add hint below the form component
Error text to render. This will replace hint text if provided.
Label of the form component
Prepend icon
Prepend icon inside input
Append icon inside input