Description Usage Arguments Author(s) See Also Examples
View source: R/render-functions.R
This is the server-side function for creating a dynamic
bs4ValueBox
.
1 2 3 4 5 | renderbs4ValueBox(expr, env = parent.frame(), quoted = FALSE)
renderbs4InfoBox(expr, env = parent.frame(), quoted = FALSE)
renderValueBox(expr, env = parent.frame(), quoted = FALSE)
|
expr |
An expression that returns a Shiny tag object, |
env |
The environment in which to evaluate |
quoted |
Is |
David Granjon, dgranjon@ymail.com
bs4ValueBoxOutput
for the corresponding UI-side function.
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 | if(interactive()){
library(shiny)
library(bs4Dash)
shiny::shinyApp(
ui = bs4DashPage(
navbar = bs4DashNavbar(),
sidebar = bs4DashSidebar(),
controlbar = bs4DashControlbar(),
footer = bs4DashFooter(),
title = "test",
body = bs4DashBody(
fluidRow(
bs4ValueBoxOutput("vbox"),
bs4InfoBoxOutput("ibox")
)
)
),
server = function(input, output) {
output$vbox <- renderbs4ValueBox({
bs4ValueBox(
value = 150,
subtitle = "New orders",
status = "primary",
icon = "shopping-cart",
href = "#"
)
})
output$ibox <- renderbs4InfoBox({
bs4InfoBox(
title = "Comments",
gradientColor = "success",
value = 41410,
icon = "comments"
)
})
}
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.