MCPcopy Create free account
hub / github.com/szhsin/react-menu

github.com/szhsin/react-menu @v4.5.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v4.5.2 ↗ · + Follow

React component for building accessible menu, dropdown, submenu, context menu, and more

155 symbols 389 edges 94 files ⚖ MIT 0 documented · 0% 10 cross-repo links ● updated 9d agolatest release v4.5.2 · 2026-06-06★ 1,2184 open issues

Browse by type

⨍ Functions 124◇ Types & classes 31
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

React-Menu

An accessible, keyboard-friendly React menu library

Live examples and docs

NPM NPM bundlephobia Snyk Vulnerability Badge

Features

  • Lightweight, unstyled React menu components
  • Unlimited submenu nesting
  • Supports dropdown, hover, and context menus
  • Radio and checkbox menu items
  • Flexible positioning options
  • Full keyboard interaction support
  • Compatible with React 18+ concurrent rendering
  • Supports server-side rendering
  • Implements WAI-ARIA menu pattern

Install

with npm

npm install @szhsin/react-menu

or with Yarn

yarn add @szhsin/react-menu

Usage

import { Menu, MenuItem, MenuButton, SubMenu } from '@szhsin/react-menu';

export default function App() {
  return (
    <Menu menuButton={<MenuButton>Open menu</MenuButton>}>
      <MenuItem>New File</MenuItem>
      <MenuItem>Save</MenuItem>
      <SubMenu label="Edit">
        <MenuItem>Cut</MenuItem>
        <MenuItem>Copy</MenuItem>
        <MenuItem>Paste</MenuItem>
      </SubMenu>
      <MenuItem>Print...</MenuItem>
    </Menu>
  );
}

Edit on CodeSandbox

Visit more examples and docs

FAQs

Still on an old version? Please checkout our migration guides.

License

MIT Licensed.

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 123
Interface 26
Class 5
Method 1

Languages

TypeScript100%

Modules by API surface

types/index.d.ts25 symbols
src/utils/utils.js11 symbols
src/components/SubMenu.js10 symbols
src/components/MenuList.js8 symbols
src/positionUtils/getPositionHelpers.js7 symbols
src/hooks/useItemState.js6 symbols
example/src/components/Example.js4 symbols
src/style-utils/index.js3 symbols
src/hooks/useHover.js3 symbols
example/src/store.js3 symbols
example/src/data/documentation.js3 symbols
example/src/components/Usage.js3 symbols

For agents

$ claude mcp add --transport http codehub https://codehub.bot/mcp

One hosted endpoint, no key: your agent can search, read and trace szhsin/react-menu and every other graph here. Cursor, Windsurf and other clients →

⬇ download graph artifact

Ask about this repo answers extend the page