Reputation: 560
I am working on creating a shiny dashboard and I am trying to create space between the different menus of the sidebar. Below is the code I have written so far for the UI.
library(shiny)
require(shinydashboard)
library(ggplot2)
library(dplyr)
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(
sidebarMenu(
menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
menuItem("Visit-us", icon = icon("send",lib='glyphicon'),
href = "http://www.burgerking.co.nz/"),
sidebarSearchForm(textId = "searchText", buttonId = "searchButton",
label = "Search..."),
fileInput("file1", "Choose CSV File",
accept = c(
"text/csv",
"text/comma-separated-values,text/plain",
".csv")),
selectInput(
"select",
label = h3("Select Channel"),
choices = c("All", "a", "b", "c"),
selectize = TRUE,
selected = "All")
)),
dashboardBody()
)
Can someone please help me show how can I add spaces between my menuitems in the side bar panel
Upvotes: 3
Views: 2323
Reputation: 711
In dashboardBody()
, add this CSS specification:
tags$head(tags$style(".sidebar-menu li { margin-bottom: 100px; }"))
Change the 100px
as needed.
Upvotes: 3