banner: Banner (deprecated)

View source: R/banner.R

bannerR Documentation

Description

[Deprecated]

banner() was renamed to phase_banner() in shinyGovstyle 0.3.0 to match the name of the GOV.UK Design System component. The arguments and output are unchanged. banner() will be removed in shinyGovstyle 1.0.0.

Usage

banner(inputId, type, label = NULL, feedback_url = NULL, width = "standard")

Arguments

The id assigned to the component's root element. For Shiny input components this is also the name used to access the value via ⁠input$<inputId>⁠.

Main type of label e.g. alpha or beta. Can be any word

Text to display. Accepts a plain character string, or shiny tag objects such as shiny::tags$b("Bold") or a shiny::tagList(). Not required if feedback_url is supplied instead.

Optional URL used to auto-generate the standard GOV.UK phase banner feedback text, e.g. "This is a new service - your feedback (opens in new tab) will help us to improve it.", with feedback linking to feedback_url. If feedback_url starts with ⁠mailto:⁠ the text instead reads "This is a new service - please contact [email address] if you have any questions or feedback.". Exactly one of label or feedback_url must be supplied.

Width of the component. One of "standard" (the default, GOV.UK's usual 960px content width), "three-quarters" (three-quarters of the viewport, never narrower than standard), "full" (no max-width, so the container fills the viewport, with grid gutters also removed), or a CSS length (e.g. "1400px", "90vw") for a custom max-width.

Value

a phase banner HTML shiny tag object

Examples

# Before
# banner("banner", "Beta", "This is a new service")

# After
phase_banner("banner", "Beta", "This is a new service")

shinyGovstyle documentation built on Oct. 16, 2026, 1:07 a.m.