gov_tag: Tag

View source: R/gov_tag.R

gov_tagR Documentation

Tag

Description

This function creates the GOV.UK tag component, used to show users the status of something.

Usage

gov_tag(inputId, text, colour = "navy")

Arguments

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 ⁠input$<inputId>⁠.

text

The text in the tag

colour

The colour of the tag. Default is navy. Other options are grey, green, teal, blue, purple, magenta, red, orange and yellow. Any other value gives a warning listing these options

Value

a tag HTML shiny tag object

See Also

Other Govstyle feedback types: confirmation_panel(), details(), gov_summary(), inset_text(), label_hint(), noti_banner(), value_box(), warning_text()

Examples

ui <- shinyGovstyle::gov_page(
  shinyGovstyle::header(
    org_name = "Example",
    service_name = "User Examples",
    logo = "shinyGovstyle/images/moj_logo.png"
  ),
  shinyGovstyle::gov_main_layout(
    shinyGovstyle::gov_tag("tag1", "Complete"),
    shinyGovstyle::gov_tag("tag2", "Incomplete", "red")
  ),
  shinyGovstyle::footer(full = TRUE)
)

server <- function(input, output, session) {}
if (interactive()) shinyApp(ui = ui, server = server)

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