This function inserts a label and optional hint.
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>.- label
Display label for the control, or
NULLfor no label. Accepts a plain character string, an HTML string, orshinytag objects such asshiny::tags$b("Bold")or ashiny::tagList().- hint_input
Display hint label for the control, or
NULLfor no hint label. Accepts the same rich content aslabel, so it can include a link.
See also
Other Govstyle feedback types:
confirmation_panel(),
details(),
gov_summary(),
gov_summary_card(),
gov_tag(),
inset_text(),
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(
label_hint(
inputId = "label1",
label = "This is a label",
hint_input = "This is a hint"
),
# Rich content: a link in the hint
label_hint(
inputId = "label2",
label = "Bold label",
hint_input = shiny::tagList(
"See the ",
shinyGovstyle::external_link(
"https://www.gov.uk",
"GOV.UK guidance"
)
)
)
),
shinyGovstyle::footer(full = TRUE)
)
server <- function(input, output, session) {}
if (interactive()) shinyApp(ui = ui, server = server)
