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

Slide animation customization. #287

Closed durr04 closed 4 years ago

durr04 commented 5 years ago

Hello,

I am sung the slide effect for react-burger-menu from the left side. Its working as expected. But currently its sliding the menu from the left of the screen. I want to make the animation 50px from the left side of the screen. I am trying using overriding the transition property as mentioned in your FAQ questions. But still somehow its not working.

Can you suggest some inputs on this?

negomi commented 5 years ago

Hi @durr04,

Do you mean you always want 50px of the menu visible, even when it's closed?

JiayiZhaoUofT commented 5 years ago

Hi @durr04,

Do you mean you always want 50px of the menu visible, even when it's closed?

Hi Negomi, I am trying to make 50px of menu visible when it is closed. Could you please give me any hints about how to do it?

negomi commented 4 years ago

Hi @JiayiZhaoUofT,

You can achieve that with something like this:

<Menu>
  // Regular menu items here
  <div className="always-visible">
    // Some always visible contents here
  </div>
</Menu>
.always-visible {
    position: absolute;
    left: 100%;
    top: 0;
    bottom: 0;
    width: 50px;
    background: #373a47;
}
JiayiZhaoUofT commented 4 years ago

Hi Nogomi, Thank you very much for getting back to me, I will try it :)

stale[bot] commented 4 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.