Learn R Programming

bslib (version 0.6.2)

bs_theme_preview: Preview a Bootstrap theme

Description

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)

Value

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

Arguments

theme

A bs_theme() object.

...

passed along to shiny::runApp().

with_themer

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

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_dependencies(), bs_theme()

Examples

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

Run the code above in your browser using DataLab