Input

Nice inputs with many variants.

Default

The input is a functional part in an application, For implementing it we have the vs-input component.

Placeholder
Disabled

Label

Add a label to the input with the property label.

Placeholder
Disabled

Label Placeholder

The placeholder can become a label when the input is focused. Use the property label-placeholder for making this.

WARNING

This property overrides the label and the placeholder

Label-placeholder
Label-placeholder-disabled

Icons

The input can have icons. Use the property icon. You can also also manipulate the icon's position with the property icon-after.

TIP

Vuesax uses the Google Material Icons font library. For a list of all available icons, visit the official Material Icons pageopen in new window.

FontAwesome and other fonts library are supported. Simply use the icon-pack and val-icon-pack parameters with fa or fas. You still need to include the Font Awesome icons in your project.

Searchsearch
Searchsearch
icon-aftermode_edit
Label-placeholderadd
Label-placeholdershopping_cart
icon-disablederror_outline
icon-disabledemail
icon-no-borderaccount_circle

Colors

You can change the color of the borders when the focus the input with the property color. You are able to use the Main Colorsopen in new window or RGB and HEX colors.

WARNING

There is only support for HEX and RGB colors

Default
Success
Danger
Warning
Dark
RGB: rgb(213, 14, 151)
HEX: #11e988

Validations

You can add a state for example of in affirmative response to a validation with success and if it is necessary to add a description or help to the user you can do it with the property description

TIP

Each of the states you can change the text, for example in the case of danger-text for the state of danger.

Email Successdone
The email is valid
Password Dangerclear
The password does not meet the standards
Date Warningwarning
The entered data could not be verified
Phone Description
Just enter the first 2 (two) numbers of your phone

Size

Size large
Size Default
Size small

API #

NameTypeParametersDescriptiondefault
v-modelbindLink values.
placeholderStringBrief suggestion describing the expected value of the input field.
labelStringLabel for the input element.
label-placeholderStringLabel label with placeholder shape for the entry element.
autofocusBoolean,StringSame as `autofocus` in native inputfalse
iconStringicon nameElement icon.
val-icon-successStringicon nameThe icon to use for success validations
val-icon-dangerStringicon nameThe icon to use for danger validations
val-icon-warningStringicon nameThe icon to use for warning validations
icon-packStringIcon Pack Class NameIcon Pack to be used. If not set, icon will default to Material Icons. ex. FA4 uses fa or fas, FA5 uses fas, far, or fal.material-icons
icon-no-borderBooleanboolean bindIf true, remove the border-right of the icon (separator between the icon and the input)false
val-icon-packStringValidation Icon Pack Class NameIcon Pack to be used by the Validation Icons. If not set, icon will default to Material Icons. ex. FA4 uses fa or fas, FA5 uses fas, far, or fal.material-icons
icon-afterBoolean,StringIf true, sets icon to appear after input.false
colorStringprimary,success,danger,warning,dark,RGB,HEXInput and text color.primary
sizeStringsmall,normal,largeSize of input.normal
typeStringemail, number, url, password, customThe type of element input.text
successBooleanboolean bindActivate the status of success in the input.false
dangerBooleanboolean bindActivate the status of danger in the input.false
warningBooleanboolean bindActivate the status of warning in the input.false
description-textStringAdd a description text to the input.false
danger-textStringText to show when the item is invalid.
success-textStringText to show when the item is valid.
warning-textStringText that is displayed in the warning state.
v-on:icon-clickFunctionEvent to trigger on click on icon