bs4Dash (version 0.5.0)

bs4Table: Create a Boostrap 4 table container

Description

Build an argon table container

Usage

bs4Table(
  ...,
  cardWrap = FALSE,
  headTitles,
  bordered = FALSE,
  striped = FALSE,
  width = 12
)

Arguments

cardWrap

Whether to wrap the table in a card. FALSE by default.

headTitles

Table header names. Must have the same length as the number of bs4TableItem in bs4TableItems. Set "" to have an empty title field.

bordered

Whether to display border between elements. FALSE by default.

striped

Whether to displayed striped in elements. FALSE by default.

width

Table width. 12 by default.

Examples

Run this code
# NOT RUN {
if (interactive()) {
 library(shiny)
 library(bs4Dash)
 shinyApp(
  ui = bs4DashPage(
    navbar = bs4DashNavbar(), 
    sidebar = bs4DashSidebar(),
    body = bs4DashBody(
     bs4Table(
      cardWrap = TRUE,
      bordered = TRUE,
      striped = TRUE,
      headTitles = c(
       "PROJECT",
       "BUDGET",
       "STATUS",
       "USERS",
       "COMPLETION",
       ""
      ),
      bs4TableItems(
       bs4TableItem("bs4 Design System"),
       bs4TableItem(dataCell = TRUE, "$2,500 USD"),
       bs4TableItem(
        dataCell = TRUE, 
        bs4Badge(
         "Pending",
         position = "right",
         status = "danger",
         rounded = TRUE
        )
       ),
       bs4TableItem(
        progressBar(id = "pb1", value = 50, size = "xxs")
       ),
       bs4TableItem(
        dataCell = TRUE, 
        "test"
       ),
       bs4TableItem(
        actionButton(
         "go",
         "Go"
        )
       )
      )
     )
    ), 
    footer = bs4DashFooter()
  ),
  server = function(input, output) { }
 )
}


# }

Run the code above in your browser using DataLab