Ready

Inputs

Inputs allow users to enter or edit content and data. The Form Input supports custom text entry or selection from pre-defined choices.

Ready

Inputs

Inputs allow users to enter or edit content and data. The Form Input supports custom text entry or selection from pre-defined choices.

Ready

Inputs

Inputs allow users to enter or edit content and data. The Form Input supports custom text entry or selection from pre-defined choices.

Anatomy

  1. Label

  2. Input

  3. Help Text

Variants

  1. Default

  2. Text Area

  3. Read Only

  4. Horizontal

States

  1. Default

  2. Hover

  3. Focus

  4. Disabled

  5. Locked

  6. Error

  7. Error with Tooltip

  8. Error with Tooltip Active

Behaviors

Text Overflow

  1. Default: Single line form inputs will overflow additional text horizontally within the field. The user can use the keyboard or scroll horizontally to view the hidden text.

  2. Text Area: Text areas allow multiple lines of text by wrapping the text. If the text exceeds the max-height of the field, then the user may use the keyboard or scroll vertically to view the hidden text.

Best Practices

1. Label

Form inputs should always include a label. ²

2. Concise and Clear

Labels should be concise and clear. Labels should not be truncated and they should use title case. ¹

3. Errors

If there is a validation error, text explaining the error should be displayed. ³

4. Placeholder Text

Placeholder text can be used to provide helpful hints or to demonstrate the format to use. It should not include critical information and should not be used as a replacement for a label. ²

5. Sizing

The Input size should support expected user input. ¹ Using equally size form inputs may look clean but this can constrain the input area and make it harder to fill out.³

6. Error with Tooltip

For situations where limited space prevents displaying a clear error message, use the tooltip error state. However, remember that tooltips are less accessible than visible text, so use them sparingly.

More

Related Pages

Accessibility

  1. Color contrast ratio for our form inputs meets AA standards, based on Web Content Accessibility Guidelines (WCAG) guidelines.

    1. Benefits: People with low vision often have difficulty reading text that does not contrast with its background. This can be exacerbated if the person has a color vision deficiency that lowers the contrast even further. Providing a minimum luminance contrast ratio between the text and its background can make the text more readable even if the person does not see the full range of colors. It also works for the rare individuals who see no color.

  2. Support Keyboard Navigation. Allow users to use the tab key to move between form fields. Form field should use the active styling to indicate which field is in focus.⁶

  3. Code A Programmatic Label. Using the html <label> </label> tags allows the label to be read by screen readers.⁶

  4. Use semantic HTML form elements such as <form> and <button> to clearly define the purpose of the from elements in the code.

Additional Reading

© 2024 Basis Technologies
© 2024 Basis Technologies
© 2024 Basis Technologies