Neat Paraskavedekatriaphobia's Meaning

    @reach/menu-button
    TypeScript icon, indicating that this package has built-in type declarations

    0.16.2 • Public • Published

    @reach/menu-button

    Stable release MIT license

    Docs | Source | WAI-ARIA

    An accessible dropdown menu for the common dropdown menu button design pattern.

    import {
      Menu,
      MenuList,
      MenuButton,
      MenuItem,
      MenuLink,
    } from "@reach/menu-button";
    import "@reach/menu-button/styles.css";
    
    function Example() {
      return (
        <Menu>
          <MenuButton>
            Actions <span aria-hidden></span>
          </MenuButton>
          <MenuList>
            <MenuItem onSelect={() => alert("Download")}>Download</MenuItem>
            <MenuItem onSelect={() => alert("Copy")}>Create a Copy</MenuItem>
            <MenuItem onSelect={() => alert("Mark as Draft")}>
              Mark as Draft
            </MenuItem>
            <MenuItem onSelect={() => alert("Delete")}>Delete</MenuItem>
            <MenuLink as="a" href="https://reacttraining.com/workshops/">
              Attend a Workshop
            </MenuLink>
          </MenuList>
        </Menu>
      );
    }

    Keywords

    none

    Install

    npm i @reach/menu-button

    DownloadsWeekly Downloads

    106,830

    Version

    0.16.2

    License

    MIT

    Unpacked Size

    50.8 kB

    Total Files

    10

    Last publish

    Collaborators

    • ryanflorence
    • mjackson
    • chancestrickland
    • blainekasten