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.05k stars 586 forks source link

Enhance moving to right #313

Closed eclectic-coding closed 5 years ago

eclectic-coding commented 5 years ago

Would it be possible to somehow connect the "right" attribute to the CSS? For instance, if I set the menu to "right" the burger icon stays on the left, unless I edit the CSS. It would be helpful if the right attribute would override the CSS as well.

Otherwise, I move it. I have added to the GatsbyJS default theme and have created a repo.

negomi commented 5 years ago

Hey @polishedwp,

I get how this could be useful in the standard case (menu on the left, burger icon also on the left etc.), but because the burger icon positioning is completely up to the user, the menu cannot know what the best right-aligned equivalent would be in every situation. For example, someone could position their burger icon in the center, or somewhere else entirely.

For this reason, I think it's best to leave it up to the user to position the burger icon, then they can put it wherever they choose. Thanks for the suggestion though.