Breaking changes
- bslib now uses the
{brand.yml}package for reading brand.yml files. This change improves compatibility with other tools that use brand.yml files, such as Quarto. The{brand.yml}package must be installed for_brand.ymlfiles to be automatically discovered. (#1227)
New features
-
Added a new
input_submit_textarea()input element, which is similar toshiny::textAreaInput(), but includes a submit button to only submit the text changes to the server on click. This is especially useful when the input text change triggers a long-running operation and/or the user wants to type longer-form input and review it before submitting it. (#1204) -
Added toast notifications based on Bootstrap's Toast component: Use
toast()to create customizable toast objects,show_toast()to display a toast message,hide_toast()for manual dismissal, andtoast_header()for structured headers with icons and status indicators. Try it withshiny::runExample("toast", package = "bslib"). (#1246) -
Added a new
input_code_editor()element that allows for light-weight code editing with syntax highlighting, using the prism-code-editor library. The editor supports 20+ languages, more than a dozen themes, and automatic light/dark mode switching. Try it withshiny::runExample("code-editor", package = "bslib"). (#1274)
Improvements and bug fixes
-
card_header()is now flex by default and gains agapargument to better support complex header layouts. (#1253) -
bs_theme_dependencies()now avoids unnecessarily copying internal package files to R's temporary directory more than once when preparing precompiled theme dependencies (e.g. for a standardbs_theme()theme). (#1184) -
Fixed an issue where the
<main>areas ofpage_sidebar()andpage_navbar()(with asidebar) were made to be a fillable containers even whenfillable = FALSE. (#1188) -
Fixed some typos in the documentation.
-
When
bs_theme(brand = FALSE)we now correctly do not apply brand theming when a_brand.ymlfile is present in the project. (#1196) -
Sidebars from
page_sidebar()andlayout_sidebar()are now resizable on desktop-sized screen widths, allowing users to resize the sidebar width as desired. (#1217) -
sidebar()gains afillableargument to support vertical fill behavior in sidebars. (#1226) -
sidebar_toggle()is now officially deprecated in favor oftoggle_sidebar(). (#1235) -
Fixed an issue where
nav_panel_hidden()could create navs that were still keyboard-discoverable. (#1264)