components / Actions and Inputs

Button Toggle

Small & Large Variation

Just like our Buttons, we can change size of our Button Toggle.

Color Options

We have three states of Button Toggles just like Buttons.

Disabled State

The disabled state should not show any option selected.

Disabling individual options

Icons

Button Toggles support the same icon options found in Buttons.

Clearable

Controlled


Content Guidelines

Give a descriptive, action-oriented label

The user relies on the button toggle label to provide context and identify how the options are related and what the choices control. Include a verb to prompt the user to take action.

Labels should follow the content guidelines for labels.

Button name should describe the option

The user should be able to use the button name to predict what the option will do.

Each button should be given 1 to 3 word names that communicate their effect and are easy to understand. Users should have no doubt as to what they are choosing.

List buttons in a logical order to make it easier to understand the options.

Button toggles should follow the content guidelines for buttons.


Best Practices

A Button Toggle should:

  • Group together actions that are related
  • Have between 2 and 5 actions to choose between
  • Limit action names to one or two short words

  • For an individual button, use a Button.
  • For a group of buttons that don't need the ability to toggle, use a Button Group.
  • For longer labels or more items, use a list of Radios.

Importing

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

import { ButtonToggle } from "@servicetitan/design-system"