A full-height page built on shad_sidebar_layout(): a collapsible sidebar, a
bar carrying the sidebar trigger and page title, and a scrolling main region.
input$<inputId> reports the sidebar state (including active, the clicked
shad_sidebar_item()); toggle it from the server with shad_sidebar_toggle().
Usage
shad_page_sidebar(
sidebar,
...,
inputId = "sidebar",
title = NULL,
header = NULL,
header_end = NULL,
container = TRUE,
page_title = title,
theme_preset = NULL,
dark = NULL,
theme = NULL,
lang = "en"
)Arguments
- ...
Main content, or named HTML attributes for the scope container.
- inputId
Input id for the sidebar layout.
- title
Optional page title shown in the bar.
- header
Optional content appended to the bar (after the title).
- header_end
Optional content pinned to the end of the bar (e.g. a dark mode switch).
- container
If
TRUE(default), wrap the main content in ashad_container(). Pass a list of arguments to configure it, orFALSEto place content flush.- page_title, theme_preset, dark, theme, lang
Passed to
page_shad().
See also
page_shad(), shad_sidebar_layout()
Other shadshiny layout:
shad_container(),
shad_grid(),
shad_page_navbar(),
shad_stack()
Examples
if (interactive()) {
shiny::shinyApp(
shad_page_sidebar(
sidebar = shad_sidebar(shad_sidebar_group("Menu",
shad_sidebar_item("home", "Home", icon = "home"))),
title = "Acme", shad_p("Main content")
),
function(input, output, session) {}
)
}