Menu Button


Menu buttons provide multiple options for a single action.

Warning This is currently experimental because more research is needed to validate it.

Examples

Contents

<MenuButton
            items={[
              {
                children: 'First action',
                onClick: () => console.log('Clicked first action')
              },
              {
                children: 'Second action',
                onClick: () => console.log('Clicked second action')
              },
              {
                children: 'Third action with a longer name',
                onClick: () => console.log('Clicked third action')
              }
            ]}
          >
            Actions
          </MenuButton>

When to use this component

Menu buttons are useful when there are multiple primary actions. For example, a 'Download' Menu Button could then offer:

  • Download to PDF
  • Download to CSV
  • Download to TXT.

Services using this pattern

  • None

There is a problem