bs4Table: Create a Boostrap 4 table container

Description Usage Arguments Author(s) Examples

View source: R/useful-items.R

Description

Build an argon table container

Usage

1
2
3
4
5
6
7
8
bs4Table(
  ...,
  cardWrap = FALSE,
  headTitles,
  bordered = FALSE,
  striped = FALSE,
  width = 12
)

Arguments

...

bs4TableItems.

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.

Author(s)

David Granjon, dgranjon@ymail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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) { }
 )
}

RX-PBB/bs4Mash documentation built on April 11, 2020, 12:15 a.m.