Closing sidebar by clicking on the page
See original GitHub issueIs there a way to close a sidebar by clicking on the page? The official semantic-ui supports this out of the box and is configurable via a closable
setting.
Is there something I can use in this library to do it?
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Hide menu sidebar when clicking outside the bar or the button
Suppose if your sidebar width is 270px,check the mouse click coordinate.If it's greater give its style left attribute as -270px;
Read more >The Sidebar has to be closed on clicking any part of screen
Hi. I have one sidebar which has form in it. The close option of the sidebar has to be performed in two ways....
Read more >How To Create a Collapsed Sidebar - W3Schools
Click on the button to open the collapsible sidebar: ☰ Open Sidebar ... Position and style the close button (top right corner) */...
Read more >Hide element when clicked outside using JavaScript
To hide an element when clicked outside, add a `click` event listener to the `document` object. On each click, check if the clicked...
Read more >Sidebar / How To / Open and Close the Sidebar - Syncfusion
Open and Close the Sidebar in JavaScript Sidebar control · show() : Method to open the Sidebar. · hide() : Method to close...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
One easy solution I found while playing with layouts is to add an
onClick
event listener to theSidebar.Pusher
element:I’ve not tested this extensively but seems to work well.
@levithomason any update about supporting
closable
props ?Its really terrible solution to wrap whole application into pusher div just for a side bar.