Input Field
Input fields are an easily discoverable, efficient, and accessible way for users to input information. They typically appear in forms or dialogue modals.
Types
There are a few different types of input field that the user can interact with:
Input Type | Type | |
---|---|---|
text
|
Text | Default text input |
Input Type | Type | |
---|---|---|
text
|
Search | Used to input one or more terms to conduct a search. |
class="input-text-wrapper is-with-end-button u-width-full-line u-max-width-500"
style="--amount-of-buttons:1"
>
class="button is-text is-only-icon"
aria-label="Clear search"
style="--button-size:1.5rem;"
>
Input Type | Type | |
---|---|---|
password
|
Password | Used to input passwords or other sensitive data. |
- | Input with two buttons | Displays up to two trailing icons to provide additional functionality to the text (for example: clear, copy, hide, edit). |
Input Type | Type | |
---|---|---|
numeric
|
Numeric | Used for numeric input |
- | Input with two buttons | Display with two buttons |
Input Type | Type | |
---|---|---|
file
|
Upload file | Used in case upload a file is necessary. |
Input Type | Type | |
---|---|---|
date
|
Date | date input |
time
|
Time | time input |
Input Type | Type | |
---|---|---|
text
|
Multi Select | Used to create ‘tags’ when the user types in the input field. |
Input Type | Type | |
---|---|---|
select
|
Dropdown | Allows users to choose one option from a list of values. |
Custom Select
Dropdown is made with drop-list
. To hide items use the u-hide
class.
Custom Select with Search
- Dropdown is made with
drop-list
. To hide items use theu-hide
class. - To adjust arrow upl add the
is-open
class, where the element withcustom-select
class. - To show/hide the button clear field, toggle the
u-hide
class.
Input Type | Type | |
---|---|---|
textarea
|
Textarea | For inputs containing more than two lines of text (for example: articles, blog posts, user feedback). |
Verification code input
Input Type | Type | |
---|---|---|
verification-code-input
|
character | Usualy used for code with numbers, but can use with amy type of input, limited for one char per textbox |
State large for verification code input:
Class | Type | |
---|---|---|
is-large | size | inrease size to 60px width & height |
States
States can be applied to all inputs fields:
Attribute | Type | |
---|---|---|
- | Default | Default text input |
disabled
|
Disabled | Used in case the user can’t interact with an input field |
readonly
|
Readonly | Used in case the user can’t change the content in the input field. Sometimes in read-only fields there is a copy button. |
Helper Text
Helper text provides information and feedback about what to enter in an input. Use the helper
class to add helper text below an input field.
Class | Type | |
---|---|---|
- | Default | Used to provide information about what should be entered into the input field. |
u-success
|
Success | An indication that the information entered into a field is valid/correct. |
u-warning
|
Warning | Used underneath the input field when the user provides incorrect information. This message should provide contextual instructions on how to fix the error. |
u-error
|
Error | An indication that the information entered into a field is invalid/incorrect. |
This is a helper
This is success
This is a warning
This is an error
This is a helper
This is success
This is a warning
This is an error
Input with All Parameters Applied