This function creates the GOV.UK inset text component, used to differentiate a block of text from the content that surrounds it, for example a quote, example, or additional information about the page.
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>.- content
Content to display in the inset. Accepts a plain character string, or
shinytag objects such asshiny::tags$b("Bold")or ashiny::tagList().
See also
Other Govstyle feedback types:
confirmation_panel(),
details(),
gov_summary(),
gov_summary_card(),
gov_tag(),
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::inset_text(
inputId = "note",
content = paste(
"It can take up to 8 weeks to register a lasting power of",
"attorney if there are no mistakes in the application."
)
),
shinyGovstyle::inset_text(
inputId = "note-rich",
content = shiny::tagList(
shiny::tags$b("Important: "),
"you can also pass tag objects."
)
)
),
shinyGovstyle::footer(full = TRUE)
)
server <- function(input, output, session) {}
if (interactive()) shinyApp(ui = ui, server = server)
