Description Usage Arguments Note Author(s) See Also Examples
Build an adminLTE3 card with tabs
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 | bs4TabCard(
...,
id = NULL,
selected = NULL,
title = NULL,
width = 6,
height = NULL,
side = c("left", "right"),
type = NULL,
footer = NULL,
status = NULL,
solidHeader = FALSE,
background = NULL,
collapsible = TRUE,
collapsed = FALSE,
closable = FALSE,
maximizable = FALSE,
icon = NULL,
gradient = FALSE,
boxToolSize = "sm",
elevation = NULL,
headerBorder = TRUE,
label = NULL,
dropdownMenu = NULL,
sidebar = NULL
)
tabBox(
...,
id = NULL,
selected = NULL,
title = NULL,
width = 6,
height = NULL,
side = c("left", "right"),
type = NULL,
footer = NULL,
status = NULL,
solidHeader = FALSE,
background = NULL,
collapsible = TRUE,
collapsed = FALSE,
closable = FALSE,
maximizable = FALSE,
icon = NULL,
gradient = FALSE,
boxToolSize = "sm",
elevation = NULL,
headerBorder = TRUE,
label = NULL,
dropdownMenu = NULL,
sidebar = NULL
)
|
... |
Contents of the box. |
id |
Card id. |
selected |
The |
title |
Optional title. |
width |
The width of the box, using the Bootstrap grid system. This is
used for row-based layouts. The overall width of a region is 12, so the
default card width of 4 occupies 1/3 of that width. For column-based
layouts, use |
height |
The height of a box, in pixels or other CSS unit. By default the height scales automatically with the content. |
side |
tabPanel side. Either left or right. |
type |
|
footer |
Optional footer text. |
status |
The status of the item. This determines the item's background color. Valid statuses are defined as follows:
|
solidHeader |
Should the header be shown with a solid color background? |
background |
If NULL (the default), the background of the box will be white. Otherwise, a color string. Valid colors are listed in validColors. See below:
|
collapsible |
If TRUE, display a button in the upper right that allows the user to collapse the box. |
collapsed |
If TRUE, start collapsed. This must be used with
|
closable |
If TRUE, display a button in the upper right that allows the user to close the box. |
maximizable |
If TRUE, the card can be displayed in full screen mode. |
icon |
Header icon. Displayed before title. Expect |
gradient |
Whether to allow gradient effect for the background color. Default to FALSE. |
boxToolSize |
Size of the toolbox: choose among "xs", "sm", "md", "lg". |
elevation |
Card elevation. |
headerBorder |
Whether to display a border between the header and body. TRUE by default |
label |
Slot for boxLabel. |
dropdownMenu |
List of items in the boxtool dropdown menu. Use boxDropdown. |
sidebar |
Slot for boxSidebar. |
User will access the tabBox input with input$<id>_box. This allows to get the state of the box and update it on the server with updateBox.
David Granjon, dgranjon@ymail.com
Other cards:
bs4CardLayout()
,
bs4SocialCard()
,
bs4UserCard()
,
descriptionBlock()
,
renderbs4InfoBox()
,
renderbs4ValueBox()
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 | if (interactive()) {
library(shiny)
library(bs4Dash)
shinyApp(
ui = dashboardPage(
header = dashboardHeader(),
sidebar = dashboardSidebar(),
controlbar = dashboardControlbar(),
footer = dashboardFooter(),
title = "tabBox",
body = dashboardBody(
tabBox(
id = "tabcard",
title = "A card with tabs",
selected = "Tab 2",
status = "primary",
solidHeader = FALSE,
type = "tabs",
tabPanel(
title = "Tab 1",
"Content 1"
),
tabPanel(
title = "Tab 2",
"Content 2"
),
tabPanel(
title = "Tab 3",
"Content 3"
)
)
)
),
server = function(input, output) {}
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.