| gov_layout | R Documentation |
gov_layout() was deprecated in shinyGovstyle 0.3.0 and will be removed in
shinyGovstyle 1.0.0. Use gov_main_layout() with gov_row() and
gov_box() instead, which also gives the page its <main> landmark:
# Before gov_layout(..., inputID = "main", size = "two-thirds", width = "standard") # After gov_main_layout( gov_row(gov_box(..., size = "two-thirds")), inputID = "main", width = "standard" )
inputID moves to gov_main_layout(inputID = ), size to
gov_box(size = ) and width to gov_main_layout(width = ). The inner
<inputID>_sub element is not recreated, so wrap the content in
shiny::tags$div(id = ...) if your own CSS or JavaScript targets it. With
the default size = "full" you don't need gov_row() or gov_box() at
all: put the content straight into gov_main_layout(...). Use one
gov_main_layout() per page; where gov_layout() was repeated inside tab
panels, put the content directly inside each panel instead (wrapped in
gov_row(gov_box(..., size = )) only if you set a narrower size).
gov_layout(..., inputID = "main", size = "full", width = "standard")
... |
include the components of the UI that you want within the main page. |
inputID |
ID of the main div. Defaults to "main" |
size |
Layout of the page. Optional are full, one-half, two-thirds, one-third and one-quarter. Defaults to "full" |
width |
Width of the component. One of |
a HTML shiny layout div
ui <- shinyGovstyle::gov_page(
shinyGovstyle::header(
org_name = "Example",
service_name = "User Examples",
logo = "shinyGovstyle/images/moj_logo.png"
),
shinyGovstyle::gov_main_layout(
shinyGovstyle::heading_text("Page heading", size = "l")
),
shinyGovstyle::footer(full = TRUE)
)
server <- function(input, output, session) {}
if (interactive()) shinyApp(ui = ui, server = server)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.