Skip to content
On this page

Input

Get user Input. Use with Field to access all functionalities

Base

This email is invalid

This username is available

You can have a message too

Show code

With Icons

Show code

Class props


How does Class props inspector work?
Class propDescriptionPropsSuffixes
counterClassClass of the counter element.hasCounter
maxlength
expandedClassClass of input when expanded.expanded
iconLeftClassClass of the left icon.icon
iconLeftSpaceClassClass of the left icon space inside the input.icon
iconRightClassClass of the right icon.iconRight
iconRightSpaceClassClass of the right icon space inside the input.iconRight
inputClassClass of the native input element.
rootClassClass of the root element.
roundedClassClass of input when rounded.rounded
sizeClassClass of the input size.sizesmall
medium
large
variantClassClass of the input variant.
👉 Variant property should be applied to the wrapping field
variantprimary
info
warning
danger


Props

Prop nameDescriptionTypeValuesDefault
autocompleteNative options to use in HTML5 validationstring-
autosizeAutomatically adjust height in textareaboolean-false
clearableAdd a button/icon to clear the inputed textboolean-
From config

input: {
  clearable: false
}
expandedMakes input full width when inside a grouped or addon fieldboolean-
hasCounterShow character counter when maxlength prop is passedboolean-
From config

input: {
  counter: false
}
iconIcon name to be addedstring-
iconClickableMakes the icon clickableboolean-
iconPackIcon pack to usestringmdi, fa, fas and any other custom icon pack
iconRightIcon name to be added on the right sidestring-
iconRightClickableMake the icon right clickableboolean-
iconRightVariantVariant of right iconstring-
maxlengthSame as native maxlength, plus character counternumber|string-
overrideboolean-
passwordRevealAdds the reveal password functionalityboolean-
roundedMakes the element roundedboolean-
sizeVertical size of input, optionalstringsmall, medium, large
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-modelnumber|string-
validationMessageThe message which is shown when a validation error occursstring-
variantColor of the control, optionalstringprimary, info, success, warning, danger, and any other custom color

Events

Event namePropertiesDescription
blur
focus
invalid
update:modelValue
input
icon-click
icon-right-click

Style

📄 Full scss file

CSS VariableSASS VariableDefault
--oruga-input-background-color$input-background-color#ffffff
--oruga-input-border-color$input-border-color$grey-lighter
--oruga-input-border-style$input-border-stylesolid
--oruga-input-border-width$input-border-width1px
--oruga-input-border-radius$input-border-radius$base-border-radius
--oruga-input-rounded-border-radius$input-rounded-border-radius$base-rounded-border-radius
--oruga-input-box-shadow$input-box-shadowinset 0 1px 2px hsla(0,0%,4%,.1)
--oruga-input-color$input-color#363636
--oruga-input-icon-zindex$input-icon-zindex4
--oruga-input-counter-font-size$input-counter-font-size.75rem
--oruga-input-counter-margin$input-counter-margin.25rem 0 0 .5rem
--oruga-input-height$input-height$control-height
--oruga-input-line-height$input-line-height$base-line-height
--oruga-input-margin$input-margin0
--oruga-input-padding$input-padding$control-padding-vertical $control-padding-horizontal
--oruga-input-textarea-max-height$input-textarea-max-height600px
--oruga-input-textarea-min-height$input-textarea-min-height120px
--oruga-input-textarea-padding$input-textarea-padding0.625em
--oruga-input-width$input-width100%
--oruga-input-max-width$input-max-width100%

Released under the MIT License.