andy
andy

Reputation: 2081

Make Shinydashboard sidebar fixed

Below is a screenshot of my shiny dashboard. I'd like the sidebar (where there is a search function) to be fixed such that when a user loads it, It doesn't collapse.

enter image description here

Upvotes: 0

Views: 454

Answers (1)

Serkan
Serkan

Reputation: 1945

You can add collapsed = FALSE to dashboardSidebar

ui <- dashboardPage(
        

        # Dashboard Title
        title = "DashboardPage",
        
        # Dashboard Header;
        header = dashboardHeader(
                
        ),
        
        # Dashboard Sidebar; 
        sidebar = dashboardSidebar(
                collapsed = FALSE
                ),
        
        # Dashboard Body;
        body = dashboardBody(
                
        )
)

Upvotes: 0

Related Questions