components / Actions and Inputs

Checkbox

A Checkbox should be used for On/Off or Yes/No questions. Each checkbox should indicate a separate decision and can be organized into groups of similar options.

Sizing

Checkboxes can be sized to be small, medium, and large. Small checkboxes are useful in small areas, and large checkboxes when a lot of whitespace is present.

States

Checkboxes can be in an error state and a disabled state.


Labels and Helper Text

No Label Checkboxes

A checkbox can be isolated, without margins or label text. This is useful when checkboxes are placed in tables.

Label Help

Labels can have a help icon with a tooltip to provide additional context to a label.

Helper Text


Indeterminate Checkboxes

Checkboxes can also be in an indeterminate state. This state is commonly used on checkboxes that control groups of items such as the bulk selection checkbox in Gmail.

Clicking a parent checkbox typically either selects or deselects all child checkboxes. When clicking a parent checkbox in an indeterminate state, default to select all.


Content Guidelines

Give a descriptive, action-oriented label

The user relies on the label to provide context and identify what the checkbox controls. Use positive and active wording for checkbox labels. Include a verb to prompt the user to take action.

Use sentence case (capitalize only the first word and proper nouns) so control labels are easy to scan. Do not use periods for short phrases or single sentences.

Checkbox labels should follow the content guidelines for labels.

Give the user the information they need to make an informed decision

The checkbox label might not give the required information and context they need to make an informed decision about the option.

Inline help is the best option for this situation because it requires no user interaction and is always visible. Keep inline help to 1-2 sentences.

Use the content guidelines for inline help.

Avoid using a Tooltip to communicate this kind of information about an option. It’s an additional step for users to mouse over the Tooltip to reveal its information, and users can’t refer to the Tooltip content and take action at the same time.

This allows techs to apply and edit project labels given to job records
Use the tooltip above

Best practices

Checkboxes should:

  • Work independently from each other: selecting one checkbox shouldn’t change the selection status of another checkbox in the list. The exception is when a checkbox is used to make a bulk selection of multiple items.
  • Be framed positively: for example, Turn on notifications instead of Turn off notifications
  • Always have a label when used to toggle a setting on or off
  • Be listed according to a logical order, whether it’s alphabetical, numerical, time-based, or some other clear system.
  • Link to more information or include a subtitle as required to provide more explanation. Don’t rely on tooltips to explain a checkbox.

Components

  • To build a full form, use the Form component.
  • For more than 5 options, like choosing tags, a Select with multiselect support could be a better option.
  • To present a list of options where users can only make a single choice, use the Radio component.
  • To build more prominent checkboxes, or with complex labels, use the Togglebox component.
  • For actions that have immediate results, use the Toggle Switch

Patterns

  • Form design pattern for how related controls are ordered.

Importing

We recommend using the Form shorthand component <Form.Checkbox />. It automatically provide the correct Form grouping structure and spacing. You can import the standalone component for custom Form layouts.

import { Checkbox } from '@servicetitan/design-system';