SMenu <s-menu>
ts
import { SMenu } from 'polaris-vue-elements'Example
vue
<script setup>
import { SButton, SMenu, SSection } from 'polaris-vue-elements'
</script>
<template>
<!-- SMenu only accepts Button and Section elements in its default slot; it's
activated the same way as SPopover, via commandFor/command on a trigger. -->
<SButton commandFor="example-menu" command="--toggle">Actions</SButton>
<SMenu id="example-menu" accessibilityLabel="Actions menu">
<SSection heading="Manage">
<SButton variant="tertiary">Edit</SButton>
<SButton variant="tertiary">Duplicate</SButton>
</SSection>
<SSection heading="Danger zone">
<SButton variant="tertiary" tone="critical">Delete</SButton>
</SSection>
</SMenu>
</template>Props
| Prop | Type | Description |
|---|---|---|
accessibilityLabel | string | A label that describes the purpose or content of the component for assistive technologies like screen readers. Use this to provide additional context when the visible content alone doesn't clearly convey the component's purpose. |
id | string | A unique identifier for the element. |
Slots
| Slot | Description |
|---|---|
default | The items displayed within the menu. Only accepts button and section components. Use button for individual menu actions and section to group related items. |