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
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@szhsin/react-menu

React menu components

0.10.8
Source
npm
Version published
Weekly downloads
105K
0.23%
Maintainers
1
Weekly downloads
 
Created
Source

React-Menu

A customisable, lightweight, and optimised React menu library with accessibility.

Live examples and documentation

NPM

Features

  • React menu components for easy and fast web development.
  • Unlimited levels of submenu.
  • Supports radio and checkbox menu items.
  • Supports context menu.
  • Customisable styling.
  • Comprehensive keyboard interactions.
  • Adheres to WAI-ARIA Authoring Practices.

Installation

npm install @szhsin/react-menu

Usage

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

export default function Example() {
    return (
        <Menu menuButton={<MenuButton>Open menu</MenuButton>}>
            <MenuItem>New File</MenuItem>
            <SubMenu label="Open">
                <MenuItem>index.html</MenuItem>
                <MenuItem>example.js</MenuItem>
                <MenuItem>about.css</MenuItem>
            </SubMenu>
            <MenuItem>Save</MenuItem>
        </Menu>
    );
}

More examples and documentation

License

MIT Licensed. Copyright (c) 2020 Zheng Song.

FAQs

Package last updated on 15 Oct 2020

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