Component · Menu

PromptInputActionMenu

Dropdown menu for tools that don't fit as direct buttons (take photo, record voice, connect…). Trigger is a '+' icon; content is projected via ng-content.

Basic usage

html
<prompt-input-action-menu ariaLabel="More actions">
  <button type="button" class="…" (click)="takePhoto()">Take a photo</button>
  <button type="button" class="…" (click)="recordVoice()">Record voice</button>
  <button type="button" class="…" (click)="connectTool()">Connect tool…</button>
</prompt-input-action-menu>

API — Inputs

NameTypeDefaultDescription
ariaLabelstring'More actions'Accessible label for the trigger and menu.
disabledbooleanfalseDisable independently of parent.

Behavior

  • Closes on outside click
  • Closes on Escape
  • Disabled inherits from parent PromptInput via DI
  • Opens with a motion-safe pop-in animation (skipped under prefers-reduced-motion)

Accessibility

  • Trigger has aria-haspopup="menu" and aria-expanded
  • Open panel has role="menu" with the same aria-label as the trigger
  • v0.1 note: keyboard navigation inside the menu is limited (no arrow-key roving tabindex yet). Migration to @spartan-ng/brain/menu planned for v0.2.
MIT © Kalvnerv0.1.0 · pre-release