Install with the following command in your React app: npm i react-simple-tree-menu // or yarn add react-simple-tree-menu To generate a TreeMenu, you need to provide data in the following structure.
Full Answer
What are the components of React?
Inspired by Downshift, a simple, data-driven, light-weight React Tree Menu component that: 1 does not depend on any UI framework 2 fully customizable with render props and control props 3 allows search 4 supports keyboard browsing
What is the function that resets the openNodes?
A function that resets the openNodes, by default it will close all nodes. activeKey is an optional parameter that will highlight the node at the given path. focusKey is also an optional parameter that will set the focus (for keyboard control) to the given path.
React Simple Tree Menu
Inspired by Downshift, a simple, data-driven, light-weight React Tree Menu component that:
Usage
To generate a TreeMenu, you need to provide data in the following structure.
Usage
To generate a TreeMenu, you need to provide data in the following structure.
Keyboard browsing
When the tree menu is focused, you can use your keyboard to browse the tree.