listgroup: BS4 list group for AdminLTE3

Description Usage Arguments Author(s) Examples

Description

Create a list group

Create a list group item

Usage

 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
bs4ListGroup(
  ...,
  type = c("basic", "action", "heading"),
  width = 4,
  .list = NULL
)

bs4ListGroupItem(
  ...,
  title = NULL,
  subtitle = NULL,
  footer = NULL,
  active = FALSE,
  disabled = FALSE,
  href = NULL
)

listGroup(..., type = c("basic", "action", "heading"), width = 4, .list = NULL)

listGroupItem(
  ...,
  title = NULL,
  subtitle = NULL,
  footer = NULL,
  active = FALSE,
  disabled = FALSE,
  href = NULL
)

Arguments

...

Item content.

type

List group type.

width

List group width. 4 by default. Between 1 and 12.

.list

Slot for programmatically generated items.

title

Item title (only if type is "heading").

subtitle

Item subtitle (only if type is "heading").

footer

Item footer content (only if type is "heading").

active

Whether the item is active or not. FALSE by default. Only if type is "action" or "heading".

disabled

Whether the item is disabled or not. FALSE by default. Only if type is "action" or "heading".

href

Item external link.

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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
if(interactive()){
 library(shiny)
 library(bs4Dash)
 
 shinyApp(
   ui = dashboardPage(
     header = dashboardHeader(),
     sidebar = dashboardSidebar(),
     controlbar = dashboardControlbar(),
     footer = dashboardFooter(),
     title = "test",
     body = dashboardBody(
      fluidRow(
       listGroup(
        type = "basic",
        listGroupItem("Cras justo odio"),
        listGroupItem("Dapibus ac facilisis in"),
        listGroupItem("Morbi leo risus")
       ),
       listGroup(
        type = "action",
        listGroupItem(
         "Cras justo odio",
         active = TRUE, 
         disabled = FALSE, 
         href = "http://www.google.fr"
        ),
        listGroupItem(
         active = FALSE, 
         disabled = FALSE, 
         "Dapibus ac facilisis in",
         href = "http://www.google.fr"
        ),
        listGroupItem(
         "Morbi leo risus",
         active = FALSE, 
         disabled = TRUE, 
         href = "http://www.google.fr"
        )
       ),
       listGroup(
        type = "heading",
        listGroupItem(
         "Donec id elit non mi porta gravida at eget metus. 
         Maecenas sed diam eget risus varius blandit.",
         active = TRUE, 
         disabled = FALSE, 
         title = "List group item heading", 
         subtitle = "3 days ago", 
         footer = "Donec id elit non mi porta."
        ),
        listGroupItem(
         "Donec id elit non mi porta gravida at eget metus. 
         Maecenas sed diam eget risus varius blandit.",
         active = FALSE, 
         disabled = FALSE, 
         title = "List group item heading", 
         subtitle = "3 days ago", 
         footer = "Donec id elit non mi porta."
        )
       )
     )
    )
   ),
   server = function(input, output) {}
 )
}

bs4Dash documentation built on July 23, 2021, 5:06 p.m.