Create a list group
Create a list group item
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
)
Item content.
List group type.
List group width. 4 by default. Between 1 and 12.
Slot for programmatically generated items.
Item title (only if type is "heading").
Item subtitle (only if type is "heading").
Item footer content (only if type is "heading").
Whether the item is active or not. FALSE by default. Only if type is "action" or "heading".
Whether the item is disabled or not. FALSE by default. Only if type is "action" or "heading".
Item external link.
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 = "https://www.google.com"
),
listGroupItem(
active = FALSE,
disabled = FALSE,
"Dapibus ac facilisis in",
href = "https://www.google.com"
),
listGroupItem(
"Morbi leo risus",
active = FALSE,
disabled = TRUE,
href = "https://www.google.com"
)
),
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) {}
)
}