shinydashboardPlus
shinydashboardPlus copied to clipboard
replace header title with an icon when minified = TRUE,
Hi,
The header title is replaced with an icon in the shinydashboardPlusDemo app https://dgranjon.shinyapps.io/shinydashboardPlusDemo/. Two quick questions:
- Is the code for shinydashboardPlusDemo available somewhere?
- if not, how to achieve the same?
Thanks much.
The code of the demo is here. Basically, the code to have alternatively a logo and a title is:
library(shiny)
library(shinydashboardPlus)
shinyApp(
ui = tagList(
dashboardPage(
options = list(sidebarExpandOnHover = TRUE),
header = dashboardHeader(
title = tagList(
span(class = "logo-lg", "shinydashboardPlus"),
img(
src = "https://www.rstudio.com/wp-content/uploads/2014/04/dplyr.png",
style = "width: 35px"
)
)
),
sidebar = dashboardSidebar(
id = "sidebar"
),
body = shinydashboard::dashboardBody(),
title = "DashboardPage"
)
),
server = function(input, output) {}
)
The important part here is class = "logo-lg"
.