Wondering what’s next for npm?Check out our public roadmap! »

react-multilevel-dropdown

1.0.5 • Public • Published

Kontentino - Making social media a piece of cake

react-multilevel-dropdown by Kontentino

ReactJS multilevel dropdown component

npm NPM NPM

React multilevel dropdown

Install

npm install react-multilevel-dropdown

NPM: npmjs.com/package/react-multilevel-dropdown

Usage

import Dropdown from 'react-multilevel-dropdown';
 
...
 
<Dropdown
  title='Dropdown title'
>
  <Dropdown.Item
    onClick={() => doSomething()}
  >
    Item 1
  </Dropdown.Item>
  <Dropdown.Item>
    Item 2
    <Dropdown.Submenu>
      <Dropdown.Item>
        Subitem 1
      </Dropdown.Item>
      <Dropdown.Item>
        Subitem 2
      </Dropdown.Item>
    </Dropdown.Submenu>
  </Dropdown.Item>
  <Dropdown.Item>
    Item 3
  </Dropdown.Item>
</Dropdown>

Docs

Props

Dropdown

NAME TYPE DEFAULT VALUE
children node null
title String null
isDisabled Boolean false
position String - 'left' or 'right' 'left'
wrapperClassName String null
buttonClassName String null
menuClassName String null

Item

NAME TYPE DEFAULT VALUE
children node null
onClick Function () => null
isActive Boolean false
className String null

Submenu

NAME TYPE DEFAULT VALUE
children node null
position String - 'left' or 'right' 'left'
className String null

Install

npm i react-multilevel-dropdown

DownloadsWeekly Downloads

48

Version

1.0.5

License

MIT

Unpacked Size

13.4 kB

Total Files

8

Last publish

Collaborators

  • avatar