UI Kit components
Jira UI Kit components
UI Kit hooks
Forge bridge APIs
Jira bridge APIs
Upgrade UI Kit versions
Previous versions

Button group

To add the ButtonGroup component to your app:

1
2
import { ButtonGroup } from '@forge/react';

Description

A button group gives users access to frequently performed, related actions.

Props

NameTypeRequiredDescription
appearance"default" | "danger" | "link" | "primary" | "subtle" | "subtle-link" | "warning"NoThe appearance to apply to all buttons.
childrenArray<Button>YesThe buttons to render inside the button group.
labelstringNoRefers to an aria-label attribute. Sets an accessible name for ButtonGroup wrapper to announce it to users of assistive technology. Usage of either this, or the titleId attribute is strongly recommended.
titleIdstringNoID referenced by the ButtonGroup wrapper's aria-labelledby attribute. This ID should be assigned to the group-button title element. Usage of either this, or the label attribute is strongly recommended.

Examples

Appearance

Default

A button group displays multiple buttons together.

Example image of a rendered default ButtonGroup

1
2
import { Button, ButtonGroup } from '@forge/react';

const ButtonGroupDefaultExample = () => {
  return (
    <ButtonGroup label="Default button group">
      <Button appearance="primary">Submit</Button>
      <Button>Cancel</Button>
    </ButtonGroup>
  );
};

Primary

The appearance to apply to all buttons.

Example image of a rendered primary ButtonGroup

1
2
import { Button, ButtonGroup } from '@forge/react';

const ButtonGroupAppearanceExample = () => {
  return (
    <ButtonGroup appearance="primary" label="Button group with appearance">
      <Button>Contact HR</Button>
      <Button>Feedback</Button>
      <Button>Request IT Support</Button>
    </ButtonGroup>
  );
};

For more examples, see the Button component.

Rate this page: