@reach-ui-fork/menu-button
v0.18.1
Published
Accessible React button dropdown menu.
Downloads
2
Readme
@reach-ui-fork/menu-button
An accessible dropdown menu for the common dropdown menu button design pattern.
import {
Menu,
MenuList,
MenuButton,
MenuItem,
MenuLink,
} from "@reach-ui-fork/menu-button";
import "@reach-ui-fork/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>
);
}