negomi / react-burger-menu

:hamburger: An off-canvas sidebar component with a collection of effects and styles using CSS transitions and SVG path animations
http://negomi.github.io/react-burger-menu/
MIT License
5.04k stars 582 forks source link

Creating a second expanding drawer/panel #397

Closed moimikey closed 3 years ago

moimikey commented 4 years ago

I've seen some issues posted/created, showing requests/questions about creating submenus. I had only seen them referencing hierarchical collapse/expand menus, but not extending the sidebar to multiple levels:

image

is there an extensible way to achieve this using events?

negomi commented 4 years ago

Hey @moimikey,

There's nothing built in, but I think you could achieve something like this by passing submenu components inside the menu items, and then conditionally showing them on click.

They'd need absolute positioning, but I was able to achieve that kind of effect visually with an extra element and these styles:

Screen Shot 2020-09-02 at 8 14 31 PM
stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.