Skip to main content

Forms IconForms

Input fields for user data collection.

Overview

Forms are essential for user interaction on both our website and dashboard products. They enable users to input data, make selections, and upload files. This documentation covers various form types, their anatomy, variations, states, accessibility considerations, and best practices.

Anatomy

Text Input / Form Group

Text Input Anatomy
  1. Label: Describes the purpose of the input field.
  2. Tooltip (optional): Provides additional information about the label.
  3. Input Field: The area where users enter text.
  4. Placeholder/Text: Example text that appears inside the input field to guide users.
  5. Icon (optional): An icon that can appear at the end of the input field. ie. View Password, Calendar, Chevron.

Text Areas

Text Area Anatomy
  1. Label: Describes the purpose of the text area.
  2. Tooltip (optional): Provides additional information about the label.
  3. Text Area Field: A larger input field for multi-line text entry.
  4. Placeholder/Text: Example text that appears inside the text area to guide users.
  5. Icon (optional): An icon that can appear at the end of the text area field. ie. View Password, Calendar, Chevron.

Radio Buttons

Text Input Anatomy
  1. Radio Button: A circular button that allows a single selection from multiple options.
  2. Option Label: Text describing the option associated with the radio button.

Checkboxes

Text Input Anatomy
  1. Checkbox: A square box that allows multiple selections from a list of options.
  2. Option Label: Text describing the option associated with the checkbox.

Toggles

Toggle Anatomy
  1. Switch: A switch that toggles between two states (on/off).
  2. Label: Optional text describing the toggle state.

Sliders

Slider Anatomy
  1. Label: The label for the slider.
  2. Slider Track: The horizontal or vertical track along which the slider thumb moves.
  3. Slider Thumb: The movable part of the slider that users drag to select a value.
  4. Number: Displays a number depending on where the thumb is in the track.

Quantity Inputs

Quantity Anatomy
  1. Label: The label for the quantity input.
  2. Input Field: A field for entering a numerical value.
  3. Increment/Decrement Buttons: Buttons to increase or decrease the value in the input field.

File Upload Boxes

File Upload Anatomy
  1. File Selector: Located at the top, allowing users to view, download, or delete the file.
  2. Drag and Drop Box: An area where users can drag and drop files for upload.
  3. Note: Information about the accepted file types (e.g., JPG, GIF, PNG, PDF, DOCX).
  4. Upload File Button: A button to initiate the file upload process.

States

Form Inputs (Text Inputs, Select, Textarea)

Form Input Default

Default

Info: The initial state of the input before any interaction.

View Code Bitbucket Repo
Form Input Hover

Hover

Info: The state when the user hovers over the input with the mouse.

View Code Bitbucket Repo
Form Input Focus

Focus

Info: The state when the input is actively selected and ready for user input.

View Code Bitbucket Repo
Form Input Disabled

Disabled

Info: The state when the input is not interactive and cannot be used.

View Code Bitbucket Repo
Form Input Error

Error

Info: The state indicating there is an issue with the input value.

View Code Bitbucket Repo
Form Input Default

Filled and Unselected

Info: The state when the input has been filled with valid data.

View Code Bitbucket Repo

Checkboxes and Radios

Checkbox Unchecked

Unchecked

Info: The state when the checkbox or radio button is not selected.

View Code Bitbucket Repo
Checkbox Checked

Checked

Info: The state when the checkbox or radio button is selected.

View Code Bitbucket Repo

Variations

Large Toggle

Large Toggle/Switch

Info: A bigger switch with the label inside the toggle itself.

View Code Bitbucket Repo
Image Upload

Image Upload

Info: Image uploads show a preview of the image to the left.

View Code Bitbucket Repo
Message Field

Message Field

Info: The message field is used for talking with other users or with Patty, on our Dashboard.

View Code Bitbucket Repo

Spacing

Form spacing example

Space between form groups

Info: Ensure the space between form groups (label + input) is space-4.

View Code Bitbucket Repo
Form spacing example

Space between label and inout

Info: Ensure the space between the label + input is space-2.

View Code Bitbucket Repo
Form spacing example

Padding inside input

Info: Ensure the padding inside of an input is space-3.

View Code Bitbucket Repo

Accessibility

  • Ensure all form elements have associated labels.
  • Use ARIA roles and properties where necessary.
  • Provide keyboard navigation support.
  • Ensure sufficient color contrast for text and interactive elements.
  • Include error messages and instructions for screen readers.

Crimes

Text Input Crime

DO NOT

Use placeholder text as a substitute for labels.

Text Input Crime

DO

Provide clear and concise error messages.

Support

If you have any questions about our design system, please contact Stephen McGhee at: stephen.mcghee@ipacconsulting.com