'Bootstrap' 5 Dashboard Framework for 'shiny' Apps

Provides a dashboard layer for 'shiny' applications built on 'bslib' and 'Bootstrap' 5. Includes a dashboard page shell, sidebar navigation, cards, value boxes, header drop-down menus and feedback components that inherit the active 'bslib' theme and follow 'Bootstrap' design patterns. Function names mirror those of the 'shinydashboard' package wherever the underlying concepts are shared, allowing existing applications to migrate with minimal changes.


bslibdash bslibdash hex logo

Lifecycle: maturing R-CMD-check License: MIT

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.

Features

  • A responsive page shell: header, collapsible/overlay sidebar, body and footer.
  • Sidebar navigation with menus, sub-items, badges and a user panel.
  • Cards that collapse, close and go full-screen, plus tabbed cards.
  • KPI tiles — value boxes and info boxes on the Bootstrap status palette.
  • Header widgets for messages, notifications and tasks.
  • Full theming through bslib::bs_theme(): components recompile their CSS automatically, so custom themes never lose bslibdash styles.

Installation

bslibdash isn't on CRAN yet. Install the development version from GitHub:

# install.packages("pak")
pak::pak("Novartis/bslibdash")

Usage

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")
)

Why bslibdash?

  • vs raw bslib — bslib gives you the building blocks (themes, cards, sidebars). bslibdash assembles them into a dashboard: a page shell, a sidebar menu with sub-items and badges, header dropdowns, KPI tiles — so you don't rebuild them in every app.
  • vs shinydashboard — same names, same mental model, but rendered with Bootstrap 5 and themed through bslib. Dynamic theming, dark mode and bs_themer() work out of the box.
  • vs bs4Dash — bslibdash stays close to vanilla bslib, so dashboards inherit your bslib theme rather than carrying a bespoke AdminLTE one.

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.

Learn more

  • Get started — a minimal skeleton and a migration guide from shinydashboard.
  • Components — a copy-pasteable tour of every component.
  • Theming — customise brand_bs_theme(), swap Bootswatch presets, add your own SCSS, and use bslib::bs_themer().
  • Function reference — every exported function, organised by topic.
  • More example apps live in inst/shiny/examples/.

Getting help

If you find a bug, please open an issue with a minimal reproducible example. To propose a change, see CONTRIBUTING.md.

Code of Conduct

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.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("bslibdash")

0.7.5 by Alexandros Kouretsis, 21 days ago


https://github.com/Novartis/bslibdash, https://opensource.nibr.com/bslibdash/


Report a bug at https://github.com/Novartis/bslibdash/issues


Browse source code at https://github.com/cran/bslibdash


Authors: Alexandros Kouretsis [aut, cre] , Ardalan Mirshani [aut] , Dominik Rafacz [aut] , Novartis Open Source Initiative [cph]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports utils, shiny, shinyjs, htmltools, bslib, bsicons, rlang, glue, sass

Suggests testthat, withr, knitr, lintr, rmarkdown, covr


See at CRAN