Inputs
To use the custom form group inputs you need to import the custom made component:
import {FormGroupInput as FgInput} from 'src/components'
Global usage
Vue.component(FgInput)
For local usage
export default {
components: {
FgInput
}
}
Custom form group inputs
The form group input component makes use of Vue's InheritAttrs feature which basically let's you extend a component very easily. In this case, form group input will accept any Input attributes as well as Bootstrap input groups through slots.
Simple with v-model
Disabled
TIP
You can use addonRight and addonLeft slots to fully customize the addons.
With icons
Different native type
Attributes
| Attribute | Description | Type | Accepted values | Default |
|---|---|---|---|---|
| value | input value | string | — | — |
| label | input label | string | — | — |
| addonRightIcon | right icon for input (is overriden by addonRight slot) | string | — | — |
| addonLeftIcon | left icon for input (is overriden by addonLeft slot) | string | — | — |
Events
| Event Name | Description | Parameters |
|---|---|---|
| input | triggers when the binding value changes (default for v-model) | the updated value |
Slots
| Name | Description |
|---|---|
| label | content for input label |
| addonLeft | content for input left addon. Refer to bootstrap form group inputs |
| addonRight | content for input right addon. Refer to bootstrap form group inputs |