bs4dash_color | R Documentation |
bs4Dash main colors
bs4dash_color(
blue = NULL,
lightblue = NULL,
navy = NULL,
cyan = NULL,
teal = NULL,
olive = NULL,
green = NULL,
lime = NULL,
orange = NULL,
yellow = NULL,
fuchsia = NULL,
purple = NULL,
maroon = NULL,
red = NULL,
black = NULL,
gray_x_light = NULL,
gray_600 = NULL,
gray_800 = NULL,
gray_900 = NULL,
white = NULL
)
blue |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#007bff")}. This color is used for primary status. |
lightblue |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#3c8dbc")}. |
navy |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#001f3f")}. |
cyan |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#17a2b8")}. This color is used for info status. |
teal |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#39cccc")}. |
olive |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#3d9970")}. |
green |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#28a745")}. This color is used for success status. |
lime |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#01ff70")}. |
orange |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#ff851b")}. |
yellow |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#ffc107")}. This color is used for warning status. |
fuchsia |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#f012be")}. |
purple |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#605ca8")}. |
maroon |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#d81b60")}. |
red |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#dc3545")}. This color is used for danger status. |
black |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#111")}. |
gray_x_light |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#d2d6de")}. |
gray_600 |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#6c757d")}. This color is used for secondary status. |
gray_800 |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#343a40")}. Color for dark skin. |
gray_900 |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#212529")}. Color for text in body. |
white |
Default: \Sexpr[results=rd, stage=install]{fresh:::rd_col("#ffffff")}. |
a list
that can be used in create_theme
.
# Change colors used in bs4Dash
bs4dash_color(
blue = "#F7FE2E",
lightblue = "#01DF3A"
)
if (interactive()) {
library(shiny)
library(bs4Dash)
ui <- bs4DashPage(
title = "bs4Dash Custom Colors",
# sidebar_collapsed = FALSE,
navbar = bs4DashNavbar(),
sidebar = bs4DashSidebar(
title = "bs4Dash Custom Colors",
skin = "light",
bs4SidebarMenu(
bs4SidebarMenuItem(
tabName = "tab1",
text = "UI components"
)
)
),
body = bs4DashBody(
use_theme(create_theme(
bs4dash_color(
blue = "#F7FE2E",
navy = "#01DF3A"
)
)),
bs4TabItems(
bs4TabItem(
tabName = "tab1",
tags$h2("UI components", class = "bg-navy"),
tags$h4("bs4ValueBox"),
fluidRow(
bs4ValueBox(
value = 150,
subtitle = "ValueBox with primary status",
status = "primary",
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")
)
)
)
)
)
)
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.