New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@szhsin/react-menu

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@szhsin/react-menu

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

  • 3.0.0-alpha.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
76K
decreased by-13.61%
Maintainers
1
Weekly downloads
 
Created
Source

React-Menu

An accessible and keyboard-friendly React menu library.

Live examples and docs

NPM TypeScript Known Vulnerabilities

Features

  • React menu components for easy and fast web development.
  • Unlimited levels of submenu.
  • Supports dropdown or context menu.
  • Supports radio and checkbox menu items.
  • Flexible menu positioning.
  • Comprehensive keyboard interactions.
  • Unstyled components and easy customisation.
  • Works in major browsers without polyfills.
  • Adheres to WAI-ARIA Authoring Practices.

Install

# with npm
npm install @szhsin/react-menu

# with Yarn
yarn add @szhsin/react-menu

Usage

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

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

License

MIT Licensed.

Keywords

FAQs

Package last updated on 26 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc