Become a theming wizard with {bslib}

David Granjon · 2022

{bslib} is a package developed by RStudio, built on top {sass} providing weapons to deeply customize your apps, in a ridiculously short amount of time and without too much pain. {fresh}, {bslib} offers a high-level set of functions allowing users to quickly customize Shiny apps. bs_theme() seamlessly modifies the main CSS properties like: The background color, namely bg, The foreground color, namely fg, Change default theme colors, also called accents, Modify the font. This leverages the font_google(), font_face() and font_link() functions. In practice, font_google() caches the font resources so that they are always available to the user. It gives the flexibility to choose Bootstrap version, falling back to version_default() if not specified. Currently, the version is 4 but will change in the future, which is why it is advised to specify a value to avoid any unexpected breaking change.

Read the paper · More papers on PaperTik