Custom 'Bootstrap' 'Sass' Themes for 'shiny' and 'rmarkdown'
Overview
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.
New features
- Added
offcanvas()to create Bootstrap offcanvas panels that slide in from an edge of the viewport. Panels can be revealed by atriggerelement in the UI or controlled from the server withshow_offcanvas(),hide_offcanvas(), andtoggle_offcanvas(). (#1328)
Documentation
layout_columns()andlayout_column_wrap()now describe their CSS length inputs with concrete examples. (@LeonidasZhak #1300)
Bug fixes
- Fixed dynamically-rendered outputs (e.g.
uiOutput()) failing to render inside a title-lesspopover()ortooltip(), caused by an upstream Shiny change. A temporary CSS workaround restores rendering. (#1326) - Fixed label-to-options spacing on
shiny::radioButtons()andshiny::checkboxGroupInput()in Bootstrap 5, where a Shiny rule was overriding the bslib fix. (#1308) - Fixed the resize handle indicator position for
position = "right"sidebars, which now correctly appears at the inner boundary of the sidebar handle. (#1322) - Allow users to directly grab the sidebar handle to resize the sidebar. (#1331)
From NEWS.md in the release
Install
Health
NOTEdependencies in R coder-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
Base packages in Suggests/Enhances imported in NAMESPACE: ‘tools’ ‘utils’
r-devel-windows-x86_64
Base packages in Suggests/Enhances imported in NAMESPACE: 'tools' 'utils'
- NOTE8 OK, 5 NOTENow
- NOTE11 OK, 2 NOTE2026-09-12
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-07-21
- ERROR12 OK, 1 ERROR2026-07-18
Show 4 earlier changesHide 4 earlier changes
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK12 OK2026-04-25
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 59 (8 internal)includes a package overview page
- Examples that run
- 100%38 run in a plain check (30 of them under a condition)
- Exported functions with examples
- 69%
- Documented parameters
- 92%
- Return-value docs
- 62%
- Help pages citing references
- 31%
Downloads
Repository
- PRs merged (all time)
- 93%
- Median days to close, 50 most recently updated closed issues
- 4
- Median days to close, 50 most recently updated closed PRs
- 3
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
Commit identities over time
13 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/rstudio/bslib on 2026-10-11.
GitHub Pages site last deployed 2026-09-22
pkgdown site last built 2026-08-03, before release 0.12.0 (2026-08-04)
Show all practicesHide 2 practices
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-03-07Seen in the repository: .claude, .claude/skillsNamed in .Rbuildignore: .claudePull request it wrote: opened by a project memberCommits: at least 2 crediting it in the message
- GitHub Copilotfirst seen 2026-08-03Commits: at least 1 crediting it in the message
- Copilot code reviewCommits: at least 1 accepting its review suggestions
- Claude Opus 4.61 commit · Apr 2026
- Claude Sonnet 4.61 commit · May 2026
Dependencies
Installing bslib adds 16 packages (12 with compiled code, 7.8 MB of source tarballs). Heaviest: sass 2.9 MB, fs 1.4 MB, jsonlite 1.0 MB.
Show the 48 most downloaded dependentsHide the 48 most downloaded dependents
and 90 more dependents and 132 packages that suggest it on CRAN ↗
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 0.12.0Latest2026-08-04 · current release · diff ↗ ·
added 4 exports
hide_offcanvas, offcanvas, show_offcanvas, toggle_offcanvas - 0.11.02026-05-16 · diff ↗ ·
added 7 exports
toolbar, toolbar_divider, toolbar_input_button, toolbar_input_select, toolbar_spacer, update_toolbar_input_button, update_toolbar_input_select - RR 4.6.0 released · 2026-04-24
- 0.10.02026-01-26 · diff ↗ ·
added 8 exports
hide_toast, input_code_editor, input_submit_textarea, show_toast, toast, toast_header, update_code_editor, update_submit_textarea - RR 4.5.0 released · 2025-04-11
- 0.9.0
- 0.8.0
- RR 4.4.0 released · 2024-04-24
- 0.7.0
- 0.6.22024-03-22 · diff ↗
- 0.6.12023-11-29 · diff ↗
- 0.6.02023-11-21 · diff ↗ ·
added 6 exports
input_dark_mode, navset_card_underline, navset_underline, showcase_bottom, toggle_dark_mode, value_box_theme - 0.5.12023-08-11 · diff ↗ ·
added 11 exports
builtin_themes, input_switch, popover, toggle_popover, toggle_sidebar, toggle_switch, toggle_tooltip, tooltip, update_popover, update_switch, update_tooltip - 0.5.02023-06-09 · diff ↗ ·
added 31 exports
accordion, accordion_panel, accordion_panel_close, accordion_panel_insert, accordion_panel_open, accordion_panel_remove, accordion_panel_set, accordion_panel_update, as_fill_carrier, as_fill_item, as_fillable_container, breakpoints, is_fill_carrier, is_fill_item, is_fillable_container, layout_columns, layout_sidebar, nav_panel, nav_panel_hidden, navset_bar, navset_card_pill, navset_card_tab, navset_hidden, navset_pill, navset_pill_list, navset_tab, page_fillable, page_sidebar, remove_all_fill, sidebar and 1 more - RR 4.3.0 released · 2023-04-21
- 0.4.22022-12-16 · diff ↗ ·
added 13 exports
as.card_item, card, card_body, card_body_fill, card_footer, card_header, card_image, card_title, is.card_item, layout_column_wrap, showcase_left_center, showcase_top_right, value_box
Show 10 earlier eventsHide 10 earlier events
- 0.4.12022-11-02 · diff ↗
- 0.4.02022-07-16 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 0.3.12021-10-06 · diff ↗
- 0.3.02021-09-02 · diff ↗ ·
removed 1 export
%>%added 24 exports
nav, nav_append, nav_content, nav_hide, nav_insert, nav_item, nav_menu, nav_prepend, nav_remove, nav_select, nav_show, nav_spacer, navs_bar, navs_hidden, navs_pill, navs_pill_card, navs_pill_list, navs_tab, navs_tab_card, page, page_fill, page_fixed, page_fluid, page_navbar - 0.2.5.12021-05-18 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 0.2.5
- 0.2.42021-01-25
- RR 4.0.0 released · 2020-04-24
Package metadata
- First published
- 2021-01-25
- Total releases
- 19 / 5 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 2.10
- Download size
- 5.6 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("bslib")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-17, which the citation names so these numbers can be found later. More on citing and the projects behind them.