Description Usage Arguments Author(s) Examples
dashboardBadge creates a badge. It may be inserted in any element like inside a actionButton or a dashboardSidebar.
1 2 3 |
... |
Badge content. |
color |
Badge color. Valid colors:
|
position |
Badge position: "left" or "right". |
rounded |
Whether the badge is rounded instead of square. FALSE by default. |
David Granjon, dgranjon@ymail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | if(interactive()){
library(shiny)
library(bs4Dash)
shinyApp(
ui = dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody(
dashboardBadge("Badge 1", color = "danger"),
actionButton(
inputId = "badge",
label = "Hello",
icon = NULL,
width = NULL,
dashboardBadge(1, color = "primary")
)
)
),
server = function(input, output) { }
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.