We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to disable expand or collapse on swiping in the Sidebar container

Platform: JavaScript - EJ 2 |
Control: Sidebar |
Published Date: May 31, 2019 |
Last Revised Date: May 31, 2019

By default, in the Sidebar control, gestures that allow you expand or collapse the sidebar container on swiping are enabled. This is used in mobile devices. You can disable this functionality by setting the enableGestures property of the Sidebar control to false. The following code snippet demonstrates how to disable expand or collapse on swiping in the sidebar container.

// Sidebar Initialization
let defaultSidebar: Sidebar = new Sidebar({
      // Disables gestures in sidebar 
      enableGestures: false


Final output

Sidebar with gestures disabled

Sample: https://stackblitz.com/edit/vapmf4-5kzvfh

You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile