A page wrapper that attaches the shadshiny asset bundle and establishes a
.shad-scope root. Built on bslib::page_fillable() when bslib is
installed, otherwise on shiny::fluidPage(). Dark mode follows
bslib::input_dark_mode() automatically because the assets key off both
.dark and [data-bs-theme="dark"].
Arguments
- ...
UI elements, or named HTML attributes for the scope container.
- title
Page title (browser tab).
- theme_preset
NULL(the default neutral theme) or one of the colour presets: the full neutral ramps"slate","stone","zinc","mauve","olive","mist","taupe", or the accents"blue","green","rose","violet","orange". Setsdata-shad-themeon the scope container.- dark
NULLto follow bslib/OS,TRUEto force dark,FALSEto force light.- theme
An optional custom
shad_theme()applied page-wide (layered overtheme_presetwhen both are given).- lang
Document language attribute.
See also
Other shadshiny page & theming:
shad_theme_preset(),
update_shad_theme()
Examples
if (interactive()) {
shiny::shinyApp(
page_shad(shad_badge("Hello"), theme_preset = "blue"),
function(input, output, session) {}
)
}