if (interactive()) {
library(shiny)
library(bs4Dash)
# width dataframe as input
shinyApp(
ui = dashboardPage(
header = dashboardHeader(),
sidebar = dashboardSidebar(),
body = dashboardBody(
bs4Table(
cardWrap = TRUE,
bordered = TRUE,
striped = TRUE,
iris
)
),
footer = dashboardFooter()
),
server = function(input, output) { }
)
# with shiny tags as input
shinyApp(
ui = dashboardPage(
header = dashboardHeader(),
sidebar = dashboardSidebar(),
body = dashboardBody(
bs4Table(
cardWrap = TRUE,
bordered = TRUE,
striped = TRUE,
list(
list(
income = "$2,500 USD",
status = dashboardBadge(
"Pending",
position = "right",
color = "danger",
rounded = TRUE
),
progress = progressBar(value = 50, status = "pink", size = "xxs"),
text = "test",
confirm = actionButton(
"go",
"Go"
)
),
list("$2,500 USD", "NA", "NA", "test", "NA")
)
)
),
footer = dashboardFooter()
),
server = function(input, output) {}
)
}
Run the code above in your browser using DataLab