Package: react-multilevel-dropdown

As time flies, we in Kontentino are developing new features and preparing improvements for our users. And as we develop, we need new custom components.

Sometimes, it is harder to find whether components, libraries, or solutions that fit our requirements. In cases like these, we need to develop our own solutions.

One of these problems like this was when we were developing a filter that looks like a dropdown selector with multiple options. We realized, that there are not so many reusable packages like our component.

So, let us introduced you to react-multilevel-dropdown. It is a ReactJS dropdown component with the possibility of endlessly nesting new menu items.

Multilevel dropdown example

You can install it via NPM. It is fully customizable, so you can adjust it as you want to. The default design is smooth and nice, and you have all the contents inside the component under control. What is very important as well is, that it is very easy to use.

Example

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>

Contributing

You can find this component as open-source on our Github. We are open to new pull requests. Feel free to contribute and help us improve the code.

You can see the documentation here.

#npm#package#reactjs
WRITTEN BYPatrik Mäsiar