View source: R/bs4Dash_theme.R
bs4Dash_theme | R Documentation |
Create a theme for bs4Dash
bs4Dash_theme(
primary = NULL,
secondary = NULL,
success = NULL,
info = NULL,
warning = NULL,
danger = NULL,
...
)
primary |
A color to be used for hyperlinks, to indicate primary/default actions, and to show active selection state in some Bootstrap components. Generally a bold, saturated color that contrasts with the theme's base colors. |
secondary |
A color for components and messages that don't need to stand out. (Not supported in Bootstrap 3.) |
success |
A color for messages that indicate an operation has succeeded. Typically green. |
info |
A color for messages that are informative but not critical. Typically a shade of blue-green. |
warning |
A color for warning messages. Typically yellow. |
danger |
A color for errors. Typically red. |
... |
Additional AdminLTE variables. |
Returns a sass::sass_bundle()
(list-like) object.
library(shiny)
library(bs4Dash)
library(fresh)
ui <- dashboardPage(
options = NULL,
header = dashboardHeader(
status = "primary",
title = dashboardBrand(
title = "My dashboard",
color = "primary",
href = "https://adminlte.io/themes/v3",
image = "https://adminlte.io/themes/v3/dist/img/AdminLTELogo.png"
)
),
sidebar = dashboardSidebar(
sidebarMenu(
menuItem(
text = "Tab 1",
tabName = "tab1",
icon = icon("van-shuttle")
),
menuItem(
text = "Tab 2",
tabName = "tab2",
icon = icon("shuttle-space")
)
)
),
body = dashboardBody(
use_theme(
bs4Dash_theme(
primary = "purple",
success = "yellow",
danger = "pink",
"sidebar-light-bg" = "#C38AFF",
"main-bg" = "#D9BBFF"
)
),
box(status = "danger", solidHeader = TRUE, title = "Title", "Content"),
box(status = "primary", solidHeader = TRUE, title = "Title", "Content"),
box(status = "success", solidHeader = TRUE, title = "Title", "Content")
),
controlbar = dashboardControlbar(),
title = "DashboardPage"
)
if (interactive()) {
shinyApp(
ui = ui,
server = function(...) {}
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.