0.1.0 • Published 4 years ago
@labrnth/menu v0.1.0
@labrnth/menu
A menu component. Built on react-menu.
Installation
yarn add @labrnth/menuUsage
import Menu from '@labrnth/menu';
<Menu />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| children | React.ReactNode | The contents of the Menu. | |
| component | any | The trigger component of the Menu. | |
| align? | start, center, end | start | The point of alignment between the menu and the anchor. |
| direction? | left, right, top, bottom | bottom | The direction the menu will be expanded. |
| position? | auto, anchor, initial | initial | The position applied to the menu. |
| viewScroll? | auto, close, initial | initial | The behaviour of the menu when scrolling. |
| withAnimation? | boolean | true | Whether to apply an animation on the expanding menu. |
| withArrow? | boolean | false | Whether to apply an arrow to the expanded menu. |
| withOffset? | boolean | false | Whether to apply an offset between the anchor and the expanded menu. |
| offsetValue? | number | 12 | When using an offset, this is the value of the offset. |
0.1.0
4 years ago