Build modern Shiny dashboards with bslib (Bootstrap 5) - page layouts, column grids, cards, value boxes, sidebars, navigation, theming - and modernize legacy fluidPage/fluidRow apps.
---
name: Shiny bslib
description: Build modern Shiny dashboards and apps using bslib (Bootstrap 5) - page layouts, grids, cards, value boxes, sidebars, navigation, theming, accordions, tooltips, and bslib inputs. Use when creating new Shiny apps or modernizing legacy ones (fluidPage, fluidRow/column, tabsetPanel, shinythemes).
---
Build professional Shiny UIs with bslib's Bootstrap 5 components, replacing legacy Shiny layout patterns. Assumes familiarity with basic Shiny.
## How to use
1. Pick a page layout: `page_sidebar()` (single-page dashboard, most common), `page_navbar()` (multi-page), `page_fillable()` (viewport-filling), or `page_fluid()` (long-form scrolling). Set a theme with `bs_theme(version = 5)`.
2. Lay out content with grids - `layout_column_wrap()` for an auto-wrapping uniform grid, or `layout_columns()` for the 12-column Bootstrap grid.
3. Use `card()` (with headers/footers and `full_screen = TRUE`) as the primary container and `value_box()` for KPIs with icons and theming.
4. Add navigation via `page_navbar()`/`nav_panel()` or component-level `navset_*` tabs, and sidebars via `page_sidebar()` or `layout_sidebar()` inside cards.
5. Consult the bundled references (page-layouts, grid-layouts, cards, value-boxes, navigation) for detailed patterns.
Full skill & source: https://github.com/posit-dev/skills/tree/main/shiny/shiny-bslib