
bslibdash gives you the vocabulary of a dashboard — a page shell, a
sidebar menu, cards, KPI tiles, header widgets — built on top of bslib and Bootstrap 5.
Because it’s a thin layer over bslib, dashboards built with bslibdash
inherit your theme, dark mode and bslib::bs_themer() for
free, and play nicely with other bslib-based Shiny packages like teal.
If you know shinydashboard, you already know most of the bslibdash API: function names and arguments mirror it wherever the underlying concept is the same, so porting an existing app is mostly search-and-replace.
bslib::bs_theme(): components recompile their CSS
automatically, so custom themes never lose bslibdash styles.bslibdash isn’t on CRAN yet. Install the development version from GitHub:
# install.packages("pak")
pak::pak("Novartis/bslibdash")library(shiny)
library(bslibdash)
ui <- dashboardPage(
header = dashboardHeader(title = "bslibdash demo"),
sidebar = dashboardSidebar(
sidebarUserPanel("Jane Doe", subtitle = "Administrator"),
sidebarMenu(
id = "sidebarMenu",
menuItem("Overview", tabName = "overview", icon = icon("house")),
menuItem("Reports", tabName = "reports", icon = icon("bar-chart"))
)
),
body = dashboardBody(
tabItems(
tabItem(
"overview",
boxLayout(
valueBox("128", "Open tickets", icon = icon("inbox"),
color = "primary"),
valueBox("42%", "CPU load", icon = icon("cpu"),
color = "warning"),
infoBox("Status", "Healthy", icon = icon("heart-pulse"),
color = "success")
),
box("Hello, world!", title = "Welcome",
status = "primary", collapsible = TRUE)
),
tabItem("reports", box("Report body", title = "Quarterly"))
)
)
)
shinyApp(ui, server = function(input, output, session) {})For a full walk-through of every component, run the kitchen-sink demo:
shiny::runApp(
system.file("shiny/examples/14_kitchen_sink", package = "bslibdash")
)bs_themer() work out of the box.Because bslibdash is just bslib underneath, it also slots into apps
built with teal, raw
bslib::page_*() layouts, shinyuieditor and bsicons — all sharing the
same theme, dark mode and bs_themer() machinery as your
dashboard shell.
brand_bs_theme(), swap Bootswatch presets, add
your own SCSS, and use bslib::bs_themer().inst/shiny/examples/.If you find a bug, please open an issue with a minimal reproducible example. To propose a change, see CONTRIBUTING.md.
Please note that this project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.