Description Usage Arguments Value Examples
bs4Dash status colors
1 2 3 4 5 6 7 8 9 10 |
primary |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#0073b7")}. |
secondary |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#6c757d")}. |
success |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#28a745")}. |
info |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#17a2b8")}. |
warning |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#ffc107")}. |
danger |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#dc3545")}. |
light |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#f8f9fa")}. |
dark |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#343a40")}. |
a list
that can be used in create_theme
.
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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | # Change colors used in bs4Dash
bs4dash_status(
primary = "#F7FE2E",
secondary = "#01DF3A"
)
if (interactive()) {
library(shiny)
library(bs4Dash)
ui <- bs4DashPage(
title = "bs4Dash Custom Status",
# sidebar_collapsed = FALSE,
navbar = bs4DashNavbar(),
sidebar = bs4DashSidebar(
title = "bs4Dash Custom Status",
skin = "light",
bs4SidebarMenu(
bs4SidebarMenuItem(
tabName = "tab1",
text = "UI components"
)
)
),
body = bs4DashBody(
use_theme(create_theme(
bs4dash_status(
primary = "#F7FE2E",
secondary = "#01DF3A"
)
)),
bs4TabItems(
bs4TabItem(
tabName = "tab1",
tags$h2("UI components"),
tags$h4("bs4ValueBox"),
fluidRow(
bs4ValueBox(
value = 150,
subtitle = "ValueBox with primary status",
status = "primary",
icon = "shopping-cart",
href = "#",
width = 4
),
bs4ValueBox(
value = 150,
subtitle = "ValueBox with secondary status",
status = "secondary",
icon = "shopping-cart",
href = "#",
width = 4
)
),
tags$h4("bs4Card"),
fluidRow(
bs4Card(
title = "Card with primary status",
closable = FALSE,
width = 6,
solidHeader = TRUE,
status = "primary",
collapsible = TRUE,
p("Box Content")
),
bs4Card(
title = "Card with secondary status",
closable = FALSE,
width = 6,
solidHeader = TRUE,
status = "secondary",
collapsible = TRUE,
p("Box Content")
)
)
)
)
)
)
server <- function(input, output) {
}
shinyApp(ui, server)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.