0.1.0 • Published 3 years ago

@labrnth/menu v0.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

@labrnth/menu

A menu component. Built on react-menu.

Installation

yarn add @labrnth/menu

Usage

import Menu from '@labrnth/menu';

<Menu />

Props

PropTypeDefaultDescription
childrenReact.ReactNodeThe contents of the Menu.
componentanyThe trigger component of the Menu.
align?start, center, endstartThe point of alignment between the menu and the anchor.
direction?left, right, top, bottombottomThe direction the menu will be expanded.
position?auto, anchor, initialinitialThe position applied to the menu.
viewScroll?auto, close, initialinitialThe behaviour of the menu when scrolling.
withAnimation?booleantrueWhether to apply an animation on the expanding menu.
withArrow?booleanfalseWhether to apply an arrow to the expanded menu.
withOffset?booleanfalseWhether to apply an offset between the anchor and the expanded menu.
offsetValue?number12When using an offset, this is the value of the offset.