AisInput
AisInput produces a branded html <input> element. It is built on top of BaseInput and intended to be used alongside other AIS form elements.
Props
v-model
Use the v-model directive to bind to an input's value. v-model uses the modelValue prop under the covers. See Vue's documentation for details.
Good morning
type
Set the input's type. AisInput is targeted at types rendered as text fields, and the expected type list is not comprehensive. Specializing the input type can be helpful to mobile users as different types will use different keyboards.
Using a native browser control is not guaranteed to provide a seamless brand experience. If one exists, you should prefer a purpose-built AIS component. For example, use AisDatepicker instead of type date.
name
name is required when the field will be submitted with a form.
placeholder
placeholder sets the text that appears when no value is set.
size
The size prop takes the standard sm, md, and lg values and adjusts the size of the input accordingly.
icon
AisInput accepts an icon prop to display an icon in the input. icon will accept either a FontAwesome icon definition or a string for one of our standard icons.
status
AisInput accepts a status prop to place the input in a logical state. status will accept the values: busy, success, error, and required. The current state will be expressed through an icon on the right side of the input.
Developers are responsible for maintaining a field's status as a user works through a particular process flow.
disabled
Use the boolean disabled prop to disable an AisInput. You can use disabled by itself or :disabled="true". If the input is used inside an AisField component, you should use the disabled prop on AisField as it will disable the input and the related content.
invalid
Use the boolean invalid prop to mark an AisInput as invalid. You can use invalid by itself or :invalid="true".
autocomplete
autocomplete controls the HTML autocomplete attribute. Review docs for details.
Events
@update:modelValue
AisInput uses Vue's standard v-model configuration. As a result, it will fire the @update:modelValue event whenever the input's value changes. Typically, v-model should be preferred, but binding the event directly may be useful in special circumstances. See Vue's documentation for details.
Methods
focus()
AisInput exposes a focus() method to programmatically focus the input element. The method can be invoked through a template ref specified on an AisInput component.