import { Canvas, Controls, Meta, Title } from '@storybook/addon-docs/blocks';
import * as AgenticMenuButtonStories from './AgenticMenuButton.stories';
<Meta of={AgenticMenuButtonStories} name='Usage' />
<Title />
## Purpose
Menu Button, `variant='agentic'`: a menu of actions the agent does. The trigger is the Button's `agentic` variant (the secondary look with the AI gradient border). With `iconOnly` the trigger is an Icon Button with `variant='agentic'`.
## Usage
- It is a value of the Menu Button's `variant` prop, not a separate component. Everything else (`menuItems`, `label`, `size`, `tally`, `statusDot`, `placement`, `isMobileAccordion` and the rest) is the Menu Button.
- `agentic` is the one `variant` that also applies with `iconOnly`; other values are ignored in icon-only mode.
- Use it for a menu whose items are things the agent does. Use the regular Menu Button for everything else.
## Accessibility
- The trigger has `aria-haspopup`, `aria-expanded` and an accessible name: the `label`, or, with `iconOnly`, the `label` as the icon button's `aria-label`.
- Keyboard and focus: the menu opens from the trigger and its items are reached with the keyboard exactly as in the Menu Button (Floating UI list navigation). This is the Menu Button's own behavior and is unchanged; it was not re-tested here.
- The gradient border is decorative; the open state shows as a fill on top of it, not by color alone.
- Not checked: no a11y panel run in this rewrite, and the open state in light and dark was not looked at.
## Implementation
See the table below for the available props. The other stories show every variant and state.
<hr />
<Canvas of={AgenticMenuButtonStories.Default} />
<Controls of={AgenticMenuButtonStories.Default} />
Agentic Menu Button
A separate component, `AgenticMenuButton`, for a menu of actions the agent does:
Extends a PDS componentOpen in Storybook