| phase_banner | R Documentation |
This function creates the GOV.UK phase banner component, used to show that a service is still being worked on, for example in alpha or beta.
phase_banner(
inputId,
type,
label = NULL,
feedback_url = NULL,
width = "standard"
)
inputId |
The id assigned to the component's root element. For Shiny
input components this is also the name used to access the value via
|
type |
Main type of label e.g. alpha or beta. Can be any word |
label |
Text to display. Accepts a plain character string, or |
feedback_url |
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 |
width |
Width of the component. One of |
a phase banner HTML shiny tag object
Other Govstyle page structure:
cookieBanner(),
footer(),
gov_page(),
header(),
layouts,
skip_to_main()
ui <- shinyGovstyle::gov_page(
shinyGovstyle::header(
org_name = "Example",
service_name = "User Examples",
logo = "shinyGovstyle/images/moj_logo.png"
),
shinyGovstyle::phase_banner(
inputId = "banner", type = "Beta", 'This is a new service'
)
)
server <- function(input, output, session) {}
if (interactive()) shinyApp(ui = ui, server = server)
# Auto-generate the standard feedback text from a URL
shinyGovstyle::phase_banner(
inputId = "banner",
type = "Beta",
feedback_url = "https://example.com/feedback"
)
# Auto-generate contact text from a mailto: link
shinyGovstyle::phase_banner(
inputId = "banner",
type = "Beta",
feedback_url = "mailto:feedback@example.com"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.