Checkboxes

A form element that indicates selected values using a check mark. Used to capture selections from predefined values.

Coded Components

Helper classes: Looking for a complete list of helper classes for these components?View helper classes

Redlines: We don't include redline comps because it's always more accurate to use developer tools to inspect the coded components, or a plugin such as the Prism Redline Tool.

Standard Checkboxes

<fieldset> <legend class="dds__mb-1">Sample checkbox label</legend> <div class="dds__form-check"> <label class="dds__form-check-label" for="checkboxName"> <input type="checkbox" id="checkboxName" name="checkboxName" class="dds__form-check-input"> <span>Value 1</span> </label></div>
<div class="dds__form-check"> <label class="dds__form-check-label" for="checkboxName2"> <input type="checkbox" id="checkboxName2" name="checkboxName2" class="dds__form-check-input"> <span>Value 2 has a lengthy label to test wrapping</span> </label>
</div>
<div class="dds__form-check"> <label class="dds__form-check-label" for="checkboxDisabledName"> <input type="checkbox" id="checkboxDisabledName" name="checkboxDisabledName" class="dds__form-check-input" disabled=""> <span>Value 3 (disabled)</span> </label>
</div> </fieldset>

Inline Checkboxes

<fieldset> <legend class="dds__mb-1">Inline sample checkbox title</legend> <div class="dds__form-check dds__form-check-inline"> <label class="dds__form-check-label" for="inlineCheckboxName0"> <input type="checkbox" id="inlineCheckboxName0" name="inlineCheckboxName0" class="dds__form-check-input"> <span>Value 1</span> </label>
</div>
<div class="dds__form-check dds__form-check-inline"> <label class="dds__form-check-label" for="inlineCheckboxName1"> <input type="checkbox" id="inlineCheckboxName1" name="inlineCheckboxName1" class="dds__form-check-input"> <span>Value 2</span> </label>
</div>
<div class="dds__form-check dds__form-check-inline"> <label class="dds__form-check-label" for="inlineCheckboxDisabledName"> <input type="checkbox" id="inlineCheckboxDisabledName" name="inlineCheckboxDisabledName" class="dds__form-check-input" disabled=""> <span>Value 3 (disabled)</span> </label>
</div> </fieldset>

Checkboxes in Error State

<fieldset> <legend class="dds__mb-1">Select at least one.</legend> <div class="dds__alert-styling"> <div class="dds__form-check"> <label class="dds__form-check-label" for="checkboxName6"> <input type="checkbox" id="checkboxName6" name="checkboxName6" class="dds__form-check-input"> <span>Option 1</span> </label> </div> <div class="dds__form-check"> <label class="dds__form-check-label" for="checkboxName7"> <input type="checkbox" id="checkboxName7" name="checkboxName7" class="dds__form-check-input"> <span>Option 2 has a lengthy label to test wrapping</span> </label> </div> </div> <div class="dds__invalid-feedback"> Error message goes here. </div> </fieldset>

Checkboxes Styled as Cards

<div class="dds__checkbox-wrapper-stroked"> <div class="dds__checkbox-stroked dds__card-stroked" tabindex="-1"> <label class="dds__card-label-stroked" for="CheckboxStroked1"> <input class="dds__sr-only dds__checkbox-custom" type="checkbox" id="CheckboxStroked1" name="CheckboxStroked1" /> <div class="dds__card-label-container"><p class="dds__card-title-stroked">Option A</p></div> <div class="dds__checkbox"><i class="dds__icons dds__check dds__font-weight-bold" aria-hidden="true"></i></div> </label> </div> <div class="dds__checkbox-stroked dds__card-stroked" tabindex="-1"> <label class="dds__card-label-stroked" for="CheckboxStroked2"> <input type="checkbox" class="dds__sr-only" id="CheckboxStroked2" name="CheckboxStroked2" /> <div class="dds__card-label-container"> <p class="dds__card-title-stroked">Option B</p> <p class="dds__card-txt-stroked-supporting">Supporting text</p> </div> <div class="dds__checkbox"><i class="dds__icons dds__check dds__font-weight-bold" aria-hidden="true"></i></div> </label> </div> <div class="dds__checkbox-stroked dds__card-stroked" tabindex="-1"> <label class="dds__card-label-stroked" for="CheckboxStroked3"> <input type="checkbox" class="dds__sr-only" id="CheckboxStroked3" name="CheckboxStroked3" /> <div class="dds__card-label-container"> <p class="dds__card-title-stroked">Option C</p> <p class="dds__card-txt-stroked-secondary">Marketing text</p> <p class="dds__card-txt-stroked-supporting">Supporting text</p> </div> <div class="dds__checkbox"><i class="dds__icons dds__check dds__font-weight-bold" aria-hidden="true"></i></div> </label> </div> <div class="dds__checkbox-stroked dds__card-stroked" tabindex="-1"> <label class="dds__card-label-stroked" for="CheckboxStroked4"> <input type="checkbox" class="dds__sr-only" id="CheckboxStroked4" name="CheckboxStroked4" /> <div class="dds__card-label-container"> <img src="https://assets.website-files.com/5c76c529d2ffcf0165d4365b/5dd2dd661e22cb7de5b67ce4_card-marketing-1.png" alt="" class="dds__card-img-stroked" /> <p class="dds__card-title-stroked">Option D</p> <p class="dds__card-txt-stroked-supporting">Supporting text</p> </div> <div class="dds__checkbox"><i class="dds__icons dds__check dds__font-weight-bold" aria-hidden="true"></i></div> </label> </div> <div class="dds__checkbox-stroked dds__card-stroked" tabindex="-1"> <label class="dds__card-label-stroked" for="CheckboxStroked5"> <input type="checkbox" class="dds__sr-only" id="CheckboxStroked5" name="CheckboxStroked5" /> <div class="dds__card-label-container"> <img src="https://assets.website-files.com/5c76c529d2ffcf0165d4365b/5dd2dd661e22cb7de5b67ce4_card-marketing-1.png" alt="" class="dds__card-img-stroked" /> <p class="dds__card-title-stroked">Option E</p> <p class="dds__card-txt-stroked-secondary">Marketing text</p> <p class="dds__card-txt-stroked-supporting">Supporting text</p> </div> <div class="dds__checkbox"><i class="dds__icons dds__check dds__font-weight-bold" aria-hidden="true"></i></div> </label> </div> <div class="dds__checkbox-stroked dds__card-stroked" tabindex="-1"> <label class="dds__card-label-stroked" for="CheckboxStroked6"> <input type="checkbox" class="dds__sr-only" id="CheckboxStroked6" name="CheckboxStroked6" disabled/> <div class="dds__card-label-container"><p class="dds__card-title-stroked">Option F</p></div> <div class="dds__checkbox"><i class="dds__icons dds__check dds__font-weight-bold" aria-hidden="true"></i></div> </label> </div>
</div>

No items found.

No items found.

Usage

Used when there is a list of predefined options and the user can select any number of them.

These values should be sorted in an easily scannable order (e.g. alphabetically or by popularity).

By default, a checkbox or list of checkboxes should start unchecked.

Remember to wrap the checkbox(es) with fieldsets and legends to make them accessible.

Horizontal inline checkboxes can make it difficult to tell which label pertains to which checkbox, so use them sparingly.

Negative language in labels can be counterintuitive. For example, use “I want to receive a promotional email” instead of “I don’t want to receive promotional email.”

Selecting a checkbox should not trigger unexpected changes in context, such as causing significant changes to the page content or opening a new window.

Do's and Don'ts

Clickable Area

Let users check the checkbox by clicking on either the checkbox itself or its label.

Common Button Labels and Usage

Title case, 2-3 words maximum.
Do not combine actions in a label (exception: "Customize & Buy").
If standard labels don't fit the button's purpose, align label with the task the user is attempting.

Please refer to the Dell Technologies branding website, https://brand.delltechnologies.com/faq/#voice, for further information regarding call-to-action labels and usage.

Button Label:
Corresponding Action:
Add to Cart
Search
Cancel
Save
Edit
Delete
Continue
Next/Previous
Submit
Select
Sign In/Sign Out
View Details
Ok/Cancel
Learn More
Close
Takes users to Cart page, with item added
Used for search buttons
Takes users back to entry point for a task
Used to save an item
Navigates users to change an item
Deletes an item on the page, usually with a verification step
Used as progression
Used as forward and backward navigation (Next is primary, Previous is secondary)
Used to submit a task or info
Used for choosing items in a task flow
Authentication standard, for consistency do not use Log In/Log Out or Signin/Signout
Used instead of “Select” in cases of product details or within learn content
For use in modal verification steps when more specific CTAs will not fit due to space
Used to link users to more learning content or contextual help
Used within modal windows

Interaction/States

A checkbox can be:

  • checked or unchecked (tree checkboxes can be partially checked)
  • enabled or disabled
  • error
  • group with error
  • hover
  • focus
  • click
  • disabled

Accessibility

The A11Y Style Guide has excellent examples of markup for checkboxes.

The W3C Web Accessibility Initiative (WAI) develops standards and support materials to help you understand and implement accessibility.

Please follow the best practices for checkboxes from WAI-ARIA authoring practices 1.1.

Please also refer to these recommendations for checkboxes from WAI-ARIA 1.1.

You may refer to this example of a two-state checkbox and example of a mixed state checkbox from WAI-ARIA practices 1.1.

You may also refer to these tutorials for forms from Web Accessibility Tutorials.