Home > front end >  Add subtitle in shinydashboard title section
Add subtitle in shinydashboard title section

Time:03-21

Is it possible to add a subtitle with smaller font size in shinydashboard title section under the main title?

## app.R ##
library(shiny)
library(shinydashboard)

ui <- dashboardPage(
  dashboardHeader(title="Dashboard"),
  dashboardSidebar(),
  dashboardBody()
)

server <- function(input, output) { }

shinyApp(ui, server)

CodePudding user response:

Something like this would work:

## app.R ##
library(shiny)
library(shinydashboard)

ui <- dashboardPage(
  dashboardHeader(
    title= div(h3('Títutlo', style="margin: 0;"), h4('subtitulo', style="margin: 0;"))
    ),
  dashboardSidebar(),
  dashboardBody()
)

server <- function(input, output) { }

shinyApp(ui, server)

enter image description here

  • Related