Button Group
Component
Display multiple related actions stacked or in a horizontal row to help with arrangement and spacing.
Related components: ButtonComponent
function onClick() {
console.log('clicked');
}
<GoAButtonGroup alignment="center">
<GoAButton type="primary" onClick={onClick}>
Button
</GoAButton>
<GoAButton type="secondary" onClick={onClick}>
Button
</GoAButton>
<GoAButton type="tertiary" onClick={onClick}>
Button
</GoAButton>
</GoAButtonGroup>
Properties
alignment
start | end | center
Positions the button group in the page layout.
gap
relaxed | compact
Sets the spacing between buttons in the button group. Defaults to
relaxed
.testId
string
Sets the data-testid attribute. Used with ByTestId queries in tests.
mt,mr,mb,ml
none | 3xs | 2xs | xs | s | m | l | xl | 2xl | 3xl | 4xl
Apply margin to the top, right, bottom, and/or left of the component.
Book time in drop in hours