1
votes

How can I make the paper-drawer-panel element behave like this site?

https://home-assistant.io/demo/

I want to be able to open and close the drawer panel even when the page is large. I also don't want there to be a drop shadow over the page when the drawer is out and the page is large, and I want the drawer to expand into the page and not overlay the "main".

I know about "forceNarrow" but it doesn't acheive what i want because it overlays the rest of the page when the drawer is active and it casts a drop shadow over the "main".

1

1 Answers

0
votes

I just tested this on one of my sites with a drawer and, when I set forceNarrow to true and back again, I don't get a backdrop or anything, it is just as in the site you linked.

I am sure you know this, but for someone else stumbling on this the code would look something like this:

var drawer = document.getElementById('drawer');
drawer.forceNarrow = true;
drawer.forceNarrow = false;

Could you link to your site, or post some code here?

Edit: Here is an example