Description Usage Arguments Author(s) See Also Examples
A beautiful AdminLTE3 info box.
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 | bs4InfoBox(
...,
tabName = NULL,
title,
value,
icon = NULL,
iconStatus = NULL,
iconElevation = NULL,
status = NULL,
gradientColor = NULL,
width = 4,
elevation = NULL
)
infoBox(
...,
tabName = NULL,
title,
value,
icon = NULL,
iconStatus = NULL,
iconElevation = NULL,
status = NULL,
gradientColor = NULL,
width = 4,
elevation = NULL
)
|
... |
Any extra UI element. |
tabName |
Optional: bs4InfoBox may be used to navigate between tabs. |
title |
Info box title. |
value |
The value to display in the box. Usually a number or short text. |
icon |
An icon tag, created by |
iconStatus |
Icon color. Only if status is NULL. |
iconElevation |
Icon elevation compared to the main content (relief). 3 by default. |
status |
A color for the box. "primary", "info", "success", "warning", "danger" or NULL. |
gradientColor |
If NULL (the default), the background of the box will be white. Otherwise, a color string. "primary", "success", "warning" or "danger". |
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 width of 4 occupies 1/3 of that width. For column-based
layouts, use |
elevation |
Infobox elevation. |
David Granjon, dgranjon@ymail.com
Other cards:
bs4Card()
,
bs4TabCard()
,
bs4ValueBox()
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 | if(interactive()){
library(shiny)
library(bs4Dash)
shiny::shinyApp(
ui = bs4DashPage(
navbar = bs4DashNavbar(),
sidebar = bs4DashSidebar(),
controlbar = bs4DashControlbar(),
footer = bs4DashFooter(),
title = "test",
body = bs4DashBody(
fluidRow(
bs4InfoBox(
title = "Messages",
value = 1410,
icon = "envelope"
),
bs4InfoBox(
title = "Bookmarks",
status = "info",
value = 240,
icon = "bookmark"
),
bs4InfoBox(
title = "Comments",
gradientColor = "danger",
value = 41410,
icon = "comments"
)
)
)
),
server = function(input, output) {}
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.