A 'Bootstrap 4' Version of 'shinydashboard'

Make 'Bootstrap 4' Shiny dashboards. Use the full power of 'AdminLTE3', a dashboard template built on top of 'Bootstrap 4' < https://github.com/ColorlibHQ/AdminLTE>.


bs4Dash

R build status version cranlogs total Codecov test coverage

Bootstrap 4 shinydashboard using AdminLTE3




From {shinydashboard} to {bs4Dash}

Taking the simple {shinydashboard} example:

library(shiny)
library(shinydashboard)

ui <- dashboardPage(
  dashboardHeader(title = "Basic dashboard"),
  dashboardSidebar(),
  dashboardBody(
    # Boxes need to be put in a row (or column)
    fluidRow(
      box(plotOutput("plot1", height = 250)),

      box(
        title = "Controls",
        sliderInput("slider", "Number of observations:", 1, 100, 50)
      )
    )
  )
)

server <- function(input, output) {
  set.seed(122)
  histdata <- rnorm(500)

  output$plot1 <- renderPlot({
    data <- histdata[seq_len(input$slider)]
    hist(data)
  })
}

shinyApp(ui, server)

Moving to {bs4Dash} is rather simple, as we just replace library(shinydashboard):

library(bs4Dash)
ui <- dashboardPage(
  dashboardHeader(title = "Basic dashboard"),
  dashboardSidebar(),
  dashboardBody(
    # Boxes need to be put in a row (or column)
    fluidRow(
      box(plotOutput("plot1", height = 250)),

      box(
        title = "Controls",
        sliderInput("slider", "Number of observations:", 1, 100, 50)
      )
    )
  )
)

server <- function(input, output) {
  set.seed(122)
  histdata <- rnorm(500)

  output$plot1 <- renderPlot({
    data <- histdata[seq_len(input$slider)]
    hist(data)
  })
}

shinyApp(ui, server)

Installation

# latest devel version
pak::pak("RinteRface/bs4Dash")
# latest devel version from r-universe
install.packages("bs4Dash", repos = c("cynkra.r-universe.dev", "cloud.r-project.org"))
# from CRAN
install.packages("bs4Dash")

Demo

You may also run:

library(bs4Dash)
bs4DashGallery()

Issues

Issues are listed here.

Acknowledgement

I warmly thank Glyphicons creator for providing them for free with Bootstrap.

Code of Conduct

Please note that the bs4Dash project is released with a Contributor Code of Conduct. By contributing to this project, you agree toabide 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("bs4Dash")

2.3.5 by David Granjon, a year ago


https://github.com/RinteRface/bs4Dash, https://bs4dash.rinterface.com/


Report a bug at https://github.com/RinteRface/bs4Dash/issues


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


Authors: David Granjon [aut, cre] , RinteRface [cph] , Almasaeed Studio [ctb, cph] (AdminLTE3 theme for Bootstrap 4) , Winston Chang [ctb, cph] (Utils functions from shinydashboard)


Documentation:   PDF Manual  


GPL (>= 2) | file LICENSE license


Imports bslib, cli, fresh, htmltools, httpuv, httr, jsonlite, lifecycle, rlang, shiny, waiter

Suggests DT, golem, knitr, rmarkdown, testthat, thematic


Imported by AbSolution, CCWeights, Familia, Holomics, Saylac, bs4Dashkit, designer, fdapaceShiny, ggpower, irtawsi, omicsTools, periscope2, shinyMixR, viewpoly.

Depended on by PERK, glossa.

Suggested by DVHmetrics, HawaSpatial, One4All, OpenSpecy, fresh, gendercoder, glasstabs, shinyEffects, shotGroups.


See at CRAN