This function create a header banner. For use at top of the screen
Usage
header(
main_text = "Shiny example app",
secondary_text = NULL,
logo = "shinyGovstyle/images/Dept_logo.svg",
main_link = NULL,
secondary_link = NULL,
logo_alt_text = "Departmental logo",
main_alt_text = NULL,
secondary_alt_text = NULL,
logo_width = 66,
logo_height = 34
)Arguments
- main_text
Main text that goes in the header
- secondary_text
Secondary header to supplement the main text the main text
- logo
Add a link to a logo which will apply in the header. Use crown to use the crown SVG version on GOV UK
- main_link
- secondary_link
- logo_alt_text
Add alternative text for the logo. Should be used when a logo is used
- main_alt_text
Add alternative text for the main link. Should be used when a main link is used
- secondary_alt_text
Add alternative text for the secondary link. Should be used when a secondary link is used
- logo_width
Change the logo size width CSS to improve fit
- logo_height
Change the logo size height CSS to improve fit
See also
Other Govstyle page structure:
banner(),
cookieBanner(),
footer(),
gov_layout(),
layouts,
skip_to_main()
Examples
ui <- shiny::fluidPage(
shinyGovstyle::header(
main_text = "Example",
secondary_text = "User Examples",
logo = "shinyGovstyle/images/moj_logo.png",
logo_alt_text = "Ministry of Justice Logo"
)
)
server <- function(input, output, session) {}
if (interactive()) shinyApp(ui = ui, server = server)
