treemenu-reactjs is an off-canvas menu component written in ReactJS with TypeScript and Styled Components.
A demo can be found here: Demo
yarn add treemenu-reactjs
# or via npm
npm install treemenu-reactjs --save
There is a small theme settings file located in /src/helpers/theme.tsx
where you can change colors and such.
<OffCanvasPanel />
component
showButton = true
: If the default menu button should be usedstate = ''
: If the menu should be visible or not. Only used when not using the default menu button'open' | 'close' | ''
animation = 'door-left'
: Animation effect of the menu. You can choose between'door-left' | 'door-right' | 'flip-bottom' | 'flip-top'
<Treemenu />
component
menuDataSource
: Menudata object used to render the menu
Install dependencies and start the development server
yarn install
yarn start
Open localhost:3000
in your browser.
Requires Node 10+ to run