Skip to content

Input

Get user Input. Use with Field to access all functionalities

Examples

Base

Show code

Variants

Show code

Sizes

Show code

With Icons

Show code

Class props

'Classes applied to the element'

Input component

Get user Input. Use with Field to access all functionalities

html
<o-input></o-input>

Props

Prop nameDescriptionTypeValuesDefault
ariaLabelledbyAccessibility label to establish relationship between the checkbox and control labelstring-Default function (see source code)
autocompleteNative options to use in HTML5 validationstring-
From config:
input: {
  autocomplete: "off"
}
autosizeAutomatically adjust height in textareaboolean-false
clearIconIcon name to be added on the clear buttonstring-
From config:
input: {
  clearIcon: "close-circle"
}
clearableAdd a button/icon to clear the inputed textboolean-
From config:
input: {
  clearable: false
}
counterShow character counter when maxlength prop is passedboolean-
From config:
input: {
  counter: false
}
disabledSame as native disabledboolean-false
expandedMakes input full width when inside a grouped or addon fieldboolean-false
iconIcon to be shownstring-
From config:
input: {
  icon: undefined
}
iconClickableMakes the icon clickableboolean-false
iconPackIcon pack to usestringmdi, fa, fas and any other custom icon pack
From config:
input: {
  iconPack: undefined
}
iconRightIcon to be added on the right sidestring-
From config:
input: {
  iconRight: undefined
}
iconRightClickableMake the icon right clickableboolean-false
iconRightVariantVariant of right iconstring-
maxlengthSame as native maxlength, plus character counternumber|string-
overrideOverride existing theme classes completelyboolean-
passwordRevealAdds the reveal password functionalityboolean-false
placeholderInput placeholderstring-
roundedMakes the element roundedboolean-false
sizeSize of the controlstringsmall, medium, large
From config:
input: {
  size: undefined
}
statusIconShow status icon using field and variant propboolean-
From config:
{
  statusIcon: true
}
typeInput type, like nativestringAny native input type, and textarea"text"
useHtml5ValidationEnable html 5 native validationboolean-
From config:
{
  useHtml5Validation: true
}
v-modelstring|number-""
validationMessageThe message which is shown when a validation error occursstring-
variantColor of the controlstringprimary, info, success, warning, danger, and any other custom color
From config:
input: {
  variant: undefined
}

Events

Event namePropertiesDescription
update:modelValuevalue string | number - updated modelValue propmodelValue prop two-way binding
inputvalue string | number - input value
event Event - native event
on input change event
focusevent Event - native eventon input focus event
blurevent Event - native eventon input blur event
invalidevent Event - native eventon input invalid event
icon-clickevent Event - native eventon icon click event
icon-right-clickevent Event - native eventon icon right click event

Sass variables

Current theme ➜ Oruga Base

SASS VariableDefault
$input-background-color#ffffff
$input-border-color$grey-lighter
$input-border-stylesolid
$input-border-width1px
$input-border-radius$base-border-radius
$input-rounded-border-radius$base-rounded-border-radius
$input-box-shadowinset 0 1px 2px hsla(0, 0%, 4%, 0.1)
$input-color#363636
$input-icon-zindex4
$input-counter-font-size0.75rem
$input-counter-margin0.25rem 0 0 0.5rem
$input-height$control-height
$input-line-height$base-line-height
$input-margin0
$input-padding$control-padding-vertical $control-padding-horizontal
$input-textarea-max-height600px
$input-textarea-min-height120px
$input-textarea-padding0.625em

See ➜ 📄 Full scss file

Current theme ➜ Oruga Full

SASS VariableDefault
$input-background-color#ffffff
$input-border-color$grey-lighter
$input-border-stylesolid
$input-border-width1px
$input-border-radius$base-border-radius
$input-rounded-border-radius$base-rounded-border-radius
$input-box-shadowinset 0 1px 2px hsla(0, 0%, 4%, 0.1)
$input-color#363636
$input-icon-zindex4
$input-counter-font-size0.75rem
$input-counter-margin0.25rem 0 0 0.5rem
$input-height$control-height
$input-line-height$base-line-height
$input-margin0
$input-padding$control-padding-vertical $control-padding-horizontal
$input-textarea-max-height600px
$input-textarea-min-height120px
$input-textarea-padding0.625em

See ➜ 📄 Full scss file

Current theme ➜ Bulma

The theme does not have any custom variables for this component.

Current theme ➜ Bootstrap

SASS VariableDefault
$input-icon-color$input-color
$input-icon-spacer0.75rem
$input-icon-padding-sm2rem
$input-icon-padding2.5rem
$input-icon-padding-lg3rem

See ➜ 📄 Full scss file

Released under the MIT License.