Skip to main content

Menu

Use Menu to display a list of actions that can be performed on a resource.

Anchor to accessibilityLabel
accessibilityLabel
string

A label that describes the purpose or contents of the element. When set, it will be announced using assistive technologies and provide additional context.

Anchor to children
children
HTMLElement

The Menu items.

Only accepts Button and Section components.

Examples
<>
<s-button commandFor="customer-menu">Edit customer</s-button>

<s-menu id="customer-menu" accessibilityLabel="Customer actions">
<s-button icon="merge">Merge customer</s-button>
<s-button icon="incoming">Request customer data</s-button>
<s-button icon="delete" tone="critical">
Delete customer
</s-button>
</s-menu>
</>

Preview

  • Presenting a set of actions or selectable options to merchants
  • Creating dropdown menus with related actions
  • Organizing actions into logical groupings using sections

  • Use for secondary or less important actions since they're hidden until merchants open them
  • Contain actions that are related to each other

  • Each item should be clear and predictable
  • Lead with a strong verb using the {verb}+{noun} format (e.g., "Buy shipping label", "Edit HTML")
  • Avoid unnecessary words and articles like "the", "an", or "a"
Was this page helpful?