szhsin/react-menu
szhsin/react-menu has 1,218 GitHub stars and 59 forks. GitHot measured -1 in 7 days. Last checked 2026-11-10 21:24 UTC. Last push 2026-10-30.
React component for building accessible menu, dropdown, submenu, context menu, and more
What you can do
- Lightweight, unstyled React menu components
- Unlimited submenu nesting
- Supports dropdown, hover, and context menus
- Radio and checkbox menu items
Measured star growth
- in 24h
- Update delayed
- in 7 days
- -1
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalReact-Menu
An accessible, keyboard-friendly React menu library
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.
Explore related projects
freeCodeCamp/freeCodeCamp
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
458,945 starsdonnemartin/system-design-primer
Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.
377,579 starsreact/react
The library for web and native user interfaces.
252,488 starsvuejs/vue
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
212,625 stars