Skip to contents

bslib 0.5.0

This significant release focuses on making dashboards with filling/responsive layouts easier. See the new Getting Started with Dashboards article to learn more. It also includes new components (accordion()) as well as many improvements and bug fixes for existing features and components.

bslib’s dashboarding features are still experimental at this point, but this release represents a significant step towards being our recommended way to create Shiny dashboards.

Breaking changes / improvements

  • card_body() now provides the same behavior as card_body_fill() (i.e., it is both a fillable container and fill item) by default. And, now, since card_body() can do everything card_body_fill() can do, card_body_fill() has been deprecated. The main benefit of this change is that card(full_screen = TRUE, ...) with output(s) passed to ... “just works” in an intuitive way. To revert to the previous behavior, set fillable = FALSE and fill = FALSE in calls to card_body() and set wrapper = function(x) card_body(x, fillable = FALSE, fill = FALSE) in calls to card(). (#498)
  • Closed #375: margin-top is no longer included on header tags that aren’t created via pandoc. If this negatively impacts spacing above headers, consider adding a suitable utility class (for example, change shiny::titlePanel("My title") to tagAppendAttributes(titlePanel("My title"), class = "mt-3", .selector = "h2")). (#396)
  • page_fill() (now called page_fillable()) had several breaking changes (listed below) to better accommodate filling layouts. If this breaks existing behavior, consider using shiny::fillPage(theme = bslib::bs_theme(), ...) instead of page_fill().
    • page_fill() now produces a <body> tag with display:flex (instead of display:block).
    • page_fill() no longer fills the windows height on mobile (i.e., narrow screens) by default (set fillable_mobile = TRUE to restore the old behavior).
    • page_fill() now adds padding and gap by default, set padding = 0 and gap = 0 to restore the old behavior.
  • page_navbar() (and also shiny::navbarPage() with theme = bs_theme()) had a couple breaking changes:
    • The container of each page is now display:flex (instead of display:block). If this breaks existing behavior, set page_navbar()’s fillable argument to FALSE.
    • header and footer is no longer wrapped in an additional shiny::fluidRow() container. If this breaks existing behavior, consider wrapping the header and footer value(s) with shiny::fluidRow()). (#479)
  • layout_column_wrap()’s fill argument now controls whether or not the layout container is allowed to grow/shrink to fit a fillable container (e.g., page_fillable()). It also gains a new fillable argument for controlling whether UI elements are allowed to fill their row height. This is more consistent with the meaning of fill in other functions, like card(), card_body(), layout_sidebar(), etc. (#498)
  • Defaults for the following Bootstrap 5 Sass variables were changed to null: $accordion-button-active-bg, $accordion-button-active-color, and $accordion-icon-active-color. To restore the old behavior, do bs_add_variables(theme, "accordion-button-active-bg" = "tint-color($component-active-bg, 90%)", "accordion-button-active-color" = "shade-color($primary, 10%)", "accordion-icon-active-color" = "$accordion-button-active-color", .where = "declarations"). (#475)

New features

Bug fixes

  • Closed #558: nested cards with fullscreen = TRUE now correctly and individually expand to fill the window. Tab focus behavior while in full screen mode has also been improved. (#557)
  • Closed #573: Improved styling when a dynamic result is supplied to value_box()’s title/value (e.g., value_box("Dynamic value", uiOutput("value"))). (#605)

Deprecations

bslib 0.4.2

CRAN release: 2022-12-16

Potentially breaking changes

  • Upgraded Bootstrap 5 (i.e., bs_theme(version = 5)) from 5.1.3 to 5.2.2. (#438, #455)

bslib 0.4.1

CRAN release: 2022-11-02

Bug Fixes

bslib 0.4.0

CRAN release: 2022-07-16

Breaking changes

  • bs_theme() now defaults to version = 5 (i.e., Bootstrap 5). If this change happens to break an existing app, consider specifying bs_theme(version = 4) to revert the change in the Bootstrap version. (#374)
  • The default coloring on some Bootswatch 4+ theme’s .navbar-default/.navbar-inverse class has changed slightly to better match their Bootswatch 3 coloring. Also, since this coloring is now based solely on $navbar-* variables, Bootswatch themes now work better in combination with custom $navbar-* values (e.g., bs_theme("navbar-bg" = ...) can be used to provide the background color, and foreground colors will automatically contrast appropriately). (#392)

New features

Bug fixes

bslib 0.3.1

CRAN release: 2021-10-06

New features

  • Upgraded Bootstrap 5 (i.e., bs_theme(version = 5)) from 5.0.2 to 5.1.0 (#365)

Bug fixes

bslib 0.3.0

CRAN release: 2021-09-02

Breaking changes

  • Closed rstudio/rmarkdown#2154: magrittr’s pipe operator (%>%) is no longer re-exported by bslib. Either library(magrittr) to make %>% available and/or use use R 4.1’s pipe operator (|>).

New features

  • Closed #82: Added support for Bootstrap 5 (via bs_theme(version = 5)). Bootstrap 4 remains the default in this release, but the next release, the default will likely change to Bootstrap 5.

Bug fixes

  • Closed #6: rmarkdown’s .tabset-fade class now works with Bootstrap 4+ since legacy use of .nav .fade is now officially supported in Bootstrap 4+. (#325)

bslib 0.2.5.1

CRAN release: 2021-05-18

Small patch release to fix failing test on Solaris.

bslib 0.2.5

CRAN release: 2021-05-12

New features and improvements

Bug fixes

bslib 0.2.4

CRAN release: 2021-01-25