MyNixOS website logo
Description

Custom 'Bootstrap' 'Sass' Themes for 'shiny' and 'rmarkdown'.

Simplifies custom 'CSS' styling of both 'shiny' and 'rmarkdown' via 'Bootstrap' 'Sass'. Supports 'Bootstrap' 3, 4 and 5 as well as their various 'Bootswatch' themes. An interactive widget is also provided for previewing themes in real time.

CRANstatus bslib statusbadge R buildstatus

bslib

The bslib R package provides a modern UI toolkit for Shiny and R Markdown based on Bootstrap. It facilitates:

  • Creation of delightful and customizable Shiny dashboards.
    • The underlying UI components (e.g., cards, value boxes, sidebars, etc) are also designed to work in other contexts (e.g., in R Markdown).
  • Custom theming of Shiny apps and R Markdown documents.
    • Apps can even be themed interactively in real-time.
  • Use of modern versions of Bootstrap and Bootswatch
    • Shiny and R Markdown currently default to Bootstrap 3 and may continue to do so to maintain backwards compatibility.

Installation

Install the bslib package from CRAN as follows:

install.packages("bslib")

An example

The quickest way to see what {bslib} can do is to run bslib::bs_theme_preview() at the console. This launches a demo app containing both {bslib} and {shiny} UI components as well as an theming widget (bslib::bs_themer()) overlaid on the app. See real-time theming to learn more.

Get started

Since {bslib} covers a wide array of uses, it has numerous getting started articles, each focusing on a particular interest:

Getting help

There are two main places to get help with bslib:

  • The RStudio community is a friendly place to ask any questions (be sure to add a bslib tag when creating a topic).

  • Stack Overflow is a great source of answers to common bslib questions. It is also a great place to get help, once you have created a reproducible example that illustrates your problem. Use the tags [r][bslib] if you ask a question. Add the tag [bslib] if you are using a Shiny runtime.

Code of Conduct

Please note that the bslib project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Metadata

Version

0.8.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows