Skip to contents

This function create warning text.

Usage

warning_text(inputId, text)

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

Text that goes in the main. Accepts a plain character string, or shiny tag objects such as shiny::tags$b("Bold") or a shiny::tagList().

Value

a warning box HTML shiny tag object

Examples

shinyGovstyle::warning_text(
  inputId = "warn1",
  text = "You can be fined up to £5,000 if you do not register."
)
#> <div class="govuk-warning-text" id="warn1">
#>   <span class="govuk-warning-text__icon" aria-hidden="true">!</span>
#>   <strong class="govuk-warning-text__text">
#>     You can be fined up to £5,000 if you do not register.
#>     <span class="govuk-visually-hidden">Warning</span>
#>   </strong>
#> </div>