Checkboxes are most commonly used to give merchants a way to make a range of selections (zero, one, or multiple). They may also be used as a way to have merchants indicate they agree to specific terms and services.

Use in forms to toggle the state of something on or off. Default checkboxes can appear as selected and disabled, or unselected.

import {Checkbox} from '@shopify/polaris';
import {useState, useCallback} from 'react';

function CheckboxExample() {
  const [checked, setChecked] = useState(false);
  const handleChange = useCallback(
    (newChecked: boolean) => setChecked(newChecked),

  return (
      label="Basic checkbox"


Want to help make this feature better? Please share your feedback.

interface CheckboxProps

Indicates the ID of the element that is controlled by the checkbox.


Indicates the ID of the element that describes the checkbox.


Label for the checkbox.


Visually hide the label.

checked?boolean | "indeterminate"

Checkbox is selected. `indeterminate` shows a horizontal line in the checkbox.


Additional text to aide in use.


Disable input.


ID for form input.


Name for form input.


Value for form input.


Display an error message.

onChange?(newChecked: boolean, id: string) => void

Callback when checkbox is toggled.

onFocus?() => void

Callback when checkbox is focussed.

onBlur?() => void

Callback when focus is removed.

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, say “Publish store” instead of “Hide store”.
  • Always have a label when used to activate or deactivate a setting.
  • 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.

Content guidelines

Lists with checkboxes

Lists that use checkboxes should:

  • Start with a capital letter


  • Option 1
  • Option 2
  • Option 3


  • option 1
  • option 2
  • option 3
  • Not use commas or semicolons at the end of each line


  • Red
  • Yellow
  • Blue


  • Red;
  • Yellow;
  • Blue.
  • In the rare case where the checkbox is asking merchants to agree to terms or service, use the first person


I agree to the Terms of Service.


You agree to the Terms of Service


Screen readers convey the state of the checkbox automatically.

  • Use the disabled prop to apply the HTML disabled attribute to the checkbox <input>. This prevents merchants from being able to interact with the checkbox, and conveys its inactive state to assistive technologies.
  • Use the id prop to provide a unique id attribute value for the checkbox. If an id isn’t provided, then the component generates one. All checkboxes must have unique id values to work correctly with assistive technologies.
  • Setting checked="indeterminate" conveys the state of the checkbox using aria-checked="mixed".
  • Setting the ariaControls prop conveys the ID of the element whose contents or presence are controlled by the checkbox to screen reader users with the aria-controls attribute.


  • The required label prop conveys the purpose of the checkbox to all merchants
  • Use the labelHidden prop to visually hide the label but make it available to assistive technologies
  • When you provide help text via the helpText prop or an inline error message via the error prop, the help or error content is conveyed to screen reader users with the aria-describedby attribute

Keyboard support

  • Move focus to each checkbox using the tab key (or shift + tab when tabbing backwards)
  • To interact with the checkbox when it has keyboard focus, press the space key