Skip to contents

Launches an example shiny app that can be used to get a quick preview of a bs_theme(), as well as an interactive GUI for tweaking some of the main theme settings. Calling bs_theme_preview() with no arguments starts the theme preview app with the default theme, which is a great way to see the available theme presets or to start creating your own theme.

Usage

bs_theme_preview(theme = bs_theme(), ..., with_themer = TRUE)

Arguments

theme

A bs_theme() object.

...

passed along to shiny::runApp().

with_themer

whether or not to run the app with run_with_themer().

Value

nothing, this function is called for its side-effects (launching an application).

Details

The app that this launches is subject to change as new features are developed in bslib and shiny.

See also

Use run_with_themer() or bs_themer() to add the theming UI to an existing shiny app.

Other Bootstrap theme functions: bs_add_variables(), bs_current_theme(), bs_dependency(), bs_global_theme(), bs_remove(), bs_theme(), bs_theme_dependencies()

Examples

if (FALSE) { # rlang::is_interactive()
theme <- bs_theme(bg = "#6c757d", fg = "white", primary = "orange")
bs_theme_preview(theme)
}