Sese Schneider Sese Schneider - 3 months ago 16
Javascript Question

How to add a side-navigation in polymer

I want to add a side navigation like this to my side:


https://www.google.com/design/spec/material-design/introduction.html


There should be a menu button and a sidenav opens:

enter image description here

But i cant find this method in
polymer
. The only possibility is the
paper-drawer-panel
but this is opend all the time...

My working paper-drawer-panel example: https://www.sese7.de/polymer/



Does anybody has an idea how to do this with polymer or maybe with https://customelements.io/

Thanks in advance ;)

Answer

Try setting the forceNarrow attribute to true.

Below is the documentation from the paper-drawer-panel api docs: https://elements.polymer-project.org/elements/paper-drawer-panel

forceNarrow

Boolean

default: false

If true, ignore responsiveWidth setting and force the narrow layout.

Comments