# Button group

&#x20;

<figure><img src="/files/5Wdvs7z5piBREyltLt8Y" alt=""><figcaption><p>Button Group with primary and secondary actions</p></figcaption></figure>

## Overview <a href="#id-86d47b" id="id-86d47b"></a>

Use Button group when you have to display multiple buttons located in the same space. Button Group will help to space buttons out evenly.

It can contain the following combinations:

* 1 `Primary Button` + 1 `Secondary button` : when two actions are available, but one is more important than the other
* 2 `Secondary Buttons` : when two actions are available, and none is more important
* 1 `Primary Button` **OR** 1 `Secondary Button` + 1 [`Menu Button`](/design/components/actions/buttons.md#menu-button)`:` when there are more than two actions available, but one stands out, and others are regrouped in a sub-menu
* 2 `buttons` + 1 [`Menu Button`](/design/components/actions/buttons.md#menu-button)

&#x20;

<figure><img src="/files/mITAJQf4qp5J5a5mDWPz" alt=""><figcaption></figcaption></figure>

## Guidelines <a href="#id-34aafc" id="id-34aafc"></a>

Buttons must be displayed in order of importance :

* `Primary Button` , if there is any, should always be displayed as the group's first action. ⚠️ Only one primary Action Button can be used in a Button Group.
* The `Secondary Button` comes afterward
* `Menu Button` comes last

💡 Please keep in mind that depending on the context, `Button group`can be displayed from left to right or from right to left.

{% hint style="success" %}
Use only one primary action

&#x20;![](/files/Qli47U35w5LHvMFqSabp)
{% endhint %}

{% hint style="success" %}
Put primary action as the first button of the group

&#x20;![](/files/CGOZLOH6oK2xVJuTR5Kp)
{% endhint %}

{% hint style="danger" %}
Do not use 2 primary actions

<img src="/files/yKpTvMn8p2Mesil895kM" alt="" data-size="original">
{% endhint %}

## Accessibility <a href="#id-34aafc" id="id-34aafc"></a>

While it's not a formal WGAC rule, it's considered good practice to maintain a minimum 8px spacing between buttons to prevent accidental clicks. This spacing is automatically managed by ROMA, so please avoid altering it for larger or smaller gaps

## Content <a href="#id-34aafc" id="id-34aafc"></a>

Button group content must follow [button guidelines](/design/components/actions/buttons.md#content).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://design.mirakl.com/design/components/actions/button-group.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
