@rightui/treeview
An unstyled, lightweight, keyboard-friendly Tree View component for your React app.
Installation
yarn add @rightui/treeview
npm i @rightui/treeview
Usage
import {Tree, TreeItem} from '@rightui/treeview';
const App = () => (
<Tree label='Menu'>
<TreeItem content="Options" ariaLevel={1}>
<TreeItem content="Option 1" ariaLevel={2}/>
<TreeItem content="Option 2" ariaLevel={2}/>
</TreeItem>
<TreeItem content="Settings" ariaLevel={1}/>
</Tree>
);
Example
Checkout the component in Sandbox.
Documentation
Accessibility
Follows the WAI-ARIA Authoring Practices.