--- title: ButtonGroup description: Displays multiple buttons in a layout. api_name: app-home source_url: html: >- https://shopify.dev/docs/api/app-home/polaris-web-components/actions/buttongroup md: >- https://shopify.dev/docs/api/app-home/polaris-web-components/actions/buttongroup.md --- # Button​Group Displays multiple buttons in a layout. ## Properties * accessibilityLabel string Label for the button group that describes the content of the group for screen reader users to understand what's included. * gap "base" | "none" Default: 'base' The gap between elements. ## Slots * children HTMLElement The content of the ButtonGroup. * primary-action HTMLElement The primary action button for the group. Accepts a single Button element with a `variant` of `primary`. Cannot be used when gap="none". * secondary-actions HTMLElement Secondary action buttons for the group. Accepts Button elements with a `variant` of `secondary` or `auto`. ### Examples * #### Code ##### jsx ```jsx Save Cancel ``` ##### html ```html Save Cancel ``` ## Examples Component examples ### Basic usage ### Examples * #### Basic usage ##### Description Standard button group with cancel and primary action for form workflows. ##### jsx ```jsx Cancel Save ``` ##### html ```html Cancel Save ``` * #### Bulk action buttons ##### Description Action buttons for selected items with destructive option. ##### jsx ```jsx Archive Export Delete ``` ##### html ```html Archive Export Delete ``` * #### Form action buttons ##### Description Typical form completion actions with clear visual hierarchy. ##### jsx ```jsx Cancel Save product ``` ##### html ```html Cancel Save product ``` * #### Buttons with icons ##### Description Icon-labeled buttons for common actions. ##### jsx ```jsx Duplicate Archive Delete ``` ##### html ```html Duplicate Archive Delete ``` * #### Segmented appearance ##### Description Tightly grouped buttons for view switching and filter options. ##### jsx ```jsx Day Week Month ``` ##### html ```html Day Week Month ``` * #### Destructive actions pattern ##### Description Confirmation dialog style with cancel option and destructive action. ##### jsx ```jsx Cancel Delete product ``` ##### html ```html Cancel Delete product ```