name: "Checkbox Button Group" description: "A styled checkable input group that communicates if an option(s) are true, false or indeterminate. A set of checkbox buttons wrapped in a fieldset that is also a form element." category: "Input" slds_classes: root: "slds-checkbox_button-group" elements: - class: "slds-checkbox_button" description: "Individual checkbox button within the group" purpose: "Container for each checkbox option in the button group" - class: "slds-checkbox_faux" description: "Visual checkbox replacement styled as a button" purpose: "Custom-styled checkbox appearance that looks like a button" - class: "slds-checkbox_button__label" description: "Label element for the checkbox button" purpose: "Provides clickable area and contains the checkbox faux element" modifiers: [] states: - class: "slds-has-error" description: "Error state styling for the form element" trigger: "When checkbox group validation fails" - class: "slds-is-disabled" description: "Disabled state styling" trigger: "When checkbox group is not interactive" variants: - name: "Base" description: "Standard checkbox button group" classes: ["slds-checkbox_button-group"] usage_context: "Default checkbox button group implementation" differences: "Group of checkbox buttons with shared border and styling" lightning_component: name: "" url: "https://developer.salesforce.com/docs/component-library/overview/components" mapping_notes: "No direct Lightning Base Component - use checkbox-button components in a group" accessibility: keyboard_support: - "Tab to navigate between checkbox buttons" - "Space to toggle checkbox state" - "Arrow keys may navigate between options in some implementations" screen_reader: - "Fieldset legend announced as group label" - "Checkbox state announced (checked/unchecked)" - "Label text read with each checkbox" - "Error messages associated and announced" aria_attributes: - "aria-describedby for error messages" - "aria-invalid when validation fails" - "aria-required for required checkbox groups" - "fieldset and legend for group semantics" usage_guidelines: when_to_use: - "When users need to select multiple options from a related set" - "For compact selection interfaces where button styling is preferred" - "When options are closely related and benefit from visual grouping" - "For scheduling, filtering, or multi-select scenarios" when_not_to_use: - "For mutually exclusive options (use radio button group instead)" - "When only one option can be selected" - "For simple binary choices (use single checkbox)" - "When space is very limited (consider dropdown instead)" best_practices: - "Use clear, descriptive legend text for the group" - "Keep option labels short and concise" - "Group related options logically" - "Provide immediate visual feedback for selections" - "Ensure adequate touch target size for mobile" - "Use error states to indicate validation issues" common_mistakes: - "Using checkbox button group for mutually exclusive options" - "Making labels too long or unclear" - "Not providing proper fieldset/legend structure" - "Missing error state handling" - "Inadequate spacing between buttons" code_examples: - title: "Basic Checkbox Button Group" code: |
description: "Basic checkbox button group with three day options" - title: "Checkbox Button Group with Error State" code: | description: "Checkbox button group with error state and validation message" - title: "Disabled Checkbox Button Group" code: | description: "Checkbox button group with disabled state options" styling_hooks: [] dependencies: css_files: ["checkbox-button-group.css", "form-element.css", "checkbox-button.css"] javascript: [] icons: [] other_components: ["form-element", "checkbox-button"] related_components: - name: "Checkbox Button" relationship: "similar" description: "Individual checkbox buttons that make up the group" - name: "Radio Button Group" relationship: "alternative" description: "For mutually exclusive options" - name: "Checkbox" relationship: "similar" description: "Standard checkbox input for single selections" references: official_docs: "https://v1.lightningdesignsystem.com/components/checkbox-button-group/" design_guidelines: "https://v1.lightningdesignsystem.com/components/checkbox-button-group/" metadata: version: "1.0.0" last_updated: "2025-01-15" author: "SLDS Documentation Team" slds_version: "2.27.2" review_status: "complete" source: "official-slds" notes: "Created from official SLDS documentation and design-system-internal source code with CSS selector annotations"