This function personalizes your Shiny dashboard's header with logo, links, favicon, font, and texts.
Usage
custom_header(
title = "MyLareShiny",
site = NULL,
favicon = NULL,
font = "Montserrat",
logosrc = NULL,
logo_height = "40px",
logo_width = NULL,
loadingsrc = NULL,
load_height = "40px",
load_width = NULL,
text = Sys.Date(),
type = 1
)
Arguments
- title
Character. Your 'shiny' app title (displayed in Navigators' tab)
- site
Character. URL for your site (opens when logo is clicked)
- favicon
Character. Image for your favicon. Save file in
www
directory.- font
Character. Font for whole 'shiny' app. Use Google Fonts names.
- logosrc, loadingsrc
Character. Logo image and loading image. For local files, save them in
www
directory to call them directly.- logo_height, logo_width, load_height, load_width
Integer. Logo and loading images dimensions.
- text
Character. Text displayed in top right corner.
- type
Integer. 1 for complete
dashboardHeader
results, 2 for title results.
Examples
if (interactive()) {
shinyApp(
ui = dashboardPage(
custom_header(
title = "MyLareShiny",
site = "https://github.com/laresbernardo/lareshiny",
font = "Montserrat",
logosrc = "logo.png",
text = Sys.Date()
),
dashboardSidebar(disable = TRUE),
dashboardBody()
),
server = function(input, output) { }
)
}