Component · C-033
Menu
A contextual action menu for a row or record. It is non-modal, navigated with arrows, and supports actions, links and separators.
Install
Install koten-theme first when the project has no Koten tokens yet.
npx shadcn@latest add https://koten.codehive.com.co/r/menu.jsonRequirements
- Portaled popup: The popup mounts in BaseMenu.Portal and is placed by Positioner, so the table around it does not clip it.
Accessibility
- The trigger announces aria-haspopup and aria-expanded; the popup uses the menu role.
- Arrows move focus, Enter runs the item, Escape closes and returns focus to the trigger.
- Separators are not focus stops and disabled items are announced as disabled.
- Being non-modal, opening it neither traps focus nor blocks the rest of the page.