Skip to contents

Wraps a gov_summary() in a GOV.UK summary card with a titled header. Use summary cards when you need to show multiple summary lists and need to tell them apart, for example in a multi-section check-your-answers page.

Usage

gov_summary_card(
  inputId,
  title,
  heading_level = 2L,
  headers,
  info,
  border = TRUE
)

Arguments

inputId

The Id for the inner summary list <dl> element.

title

Character string. The card title text.

heading_level

Integer (1-6). HTML heading level for the card title. Default 2L.

headers

See gov_summary().

info

See gov_summary().

border

See gov_summary().

Value

An HTML shiny tag object.

Examples

ui <- shinyGovstyle::gov_page(
  shinyGovstyle::header(
    org_name = "Example",
    service_name = "User Examples"
  ),
  shinyGovstyle::gov_main_layout(
    shinyGovstyle::gov_summary_card(
      inputId = "cardID",
      title = "Lead tenant",
      headers = c("Age", "Nationality"),
      info = c("38", "French")
    )
  ),
  shinyGovstyle::footer(full = TRUE)
)
if (interactive()) {
  shinyApp(ui = ui, server = function(input, output, session) {})
}