header: Header Function

View source: R/header.R

headerR Documentation

Description

This function create a header banner. For use at top of the screen

Usage

header(
  org_name = "Shiny example app",
  service_name = NULL,
  logo = "shinyGovstyle/images/Dept_logo.svg",
  main_text = lifecycle::deprecated(),
  secondary_text = lifecycle::deprecated(),
  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

org_name

Organisation name that goes in the header

service_name

Service name to supplement the organisation name

Add a link to a logo which will apply in the header. Use crown to use the crown SVG version on GOV UK

main_text

[Deprecated] Use org_name instead

secondary_text

[Deprecated] Use service_name instead

main_link

Add a link for clicking on main text [Deprecated]

secondary_link

Add a link for clicking on secondary header [Deprecated]

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 [Deprecated]

secondary_alt_text

Add alternative text for the secondary link. Should be used when a secondary link is used [Deprecated]

logo_width

Change the logo size width CSS to improve fit

logo_height

Change the logo size height CSS to improve fit

Value

a header HTML shiny tag object

See Also

Other Govstyle page structure: banner(), cookieBanner(), footer(), gov_layout(), layouts, skip_to_main()

Examples

ui <- shiny::fluidPage(
  shinyGovstyle::header(
    org_name = "Example",
    service_name = "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)

shinyGovstyle documentation built on April 13, 2026, 5:06 p.m.