gov_list: Gov List function

View source: R/gov_list.R

gov_listR Documentation

Gov List function

Description

Gov List function

Usage

gov_list(list, style = "none")

Arguments

list

vector or list of items. Each item accepts a plain character string, or shiny tag objects such as shiny::tags$a() (e.g. to add a link to a bullet) or a shiny::tagList().

style

options: "none", "bullet", "number". defaults to "none"

Value

A Shiny tag representing an ordered or unordered HTML list.

See Also

Other Govstyle text types: date_Input(), heading_text(), input_field(), text_Input(), text_area_Input()

Examples

ui <- shinyGovstyle::gov_page(
  shinyGovstyle::header(
    org_name = "Example",
    service_name = "User Examples"
  ),
  shinyGovstyle::phase_banner(
    inputId = "banner", type = "beta", 'This is a new service'
  ),
  shinyGovstyle::gov_main_layout(
    shinyGovstyle::heading_text("gov_list", size = "s"),
    shinyGovstyle::gov_text("List:"),
    gov_list(list = c("a", "b", "c")),
    shinyGovstyle::gov_text("Bulleted list:"),
    gov_list(list = c("a", "b", "c"), style = "bullet"),
    shinyGovstyle::gov_text("Numbered list:"),
    gov_list(list = c("one", "two", "three"), style = "number"),
    shinyGovstyle::gov_text("List with a link:"),
    gov_list(
      list = list(
        "Plain item",
        shiny::tags$a(href = "https://www.gov.uk", "A link"),
        shiny::tagList("Item with ", shiny::tags$b("bold"), " text")
      ),
      style = "bullet"
    )
  )
)

server <- function(input, output, session) {}

if (interactive()) shinyApp(ui = ui, server = server)

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