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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Default Sidebar to closed on page load

Thread ID:





149427 Nov 26,2019 05:49 AM UTC Nov 27,2019 01:12 PM UTC Blazor 1
Tags: Sidebar
Asked On November 26, 2019 05:49 AM UTC

Hey there,

Does anyone know how to default the Sidebar to closed when the page first loads?

I have tried doing it in the load and initialize events of the page but nothing seems to work.


Sowmiya Padmanaban [Syncfusion]
Replied On November 27, 2019 01:12 PM UTC

Hi Nick, 
Thanks for contecting Syncfusion support. 
We have analyzed your requirement to close the sidebar element during initial rendering. In that case, you have to set the sidebar element type as “Push”. In that case, the sidebar is rendered in closed state. When you set type as Push in sidebar element, it will open sidebar in push mode even in mobile and desktop.  
Refer the below code snippet. 
<EjsSidebar Width="250px" @ref="sidebarObj" Type=SidebarType.Push> 
        <div style="text-align: center;" class="text-content"> Sidebar </div> 

To know more about the sidebar type, Refer the below link. 
Please let us know, if you have any concerns. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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
Live Chat Icon