Create a theme for bs4Dash
bs4Dash_theme(
primary = NULL,
secondary = NULL,
success = NULL,
info = NULL,
warning = NULL,
danger = NULL,
...
)
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.
A color for components and messages that don't need to stand out. (Not supported in Bootstrap 3.)
A color for messages that indicate an operation has succeeded. Typically green.
A color for messages that are informative but not critical. Typically a shade of blue-green.
A color for warning messages. Typically yellow.
A color for errors. Typically red.
Additional AdminLTE variables.
Returns a sass::sass_bundle()
(list-like) object.
library(shiny)
library(bs4Dash)
#>
#> Attaching package: ‘bs4Dash’
#> The following objects are masked from ‘package:bslib’:
#>
#> accordion, popover, tooltip
#> The following objects are masked from ‘package:shiny’:
#>
#> actionButton, column, insertTab, navbarMenu, tabsetPanel
#> The following object is masked from ‘package:graphics’:
#>
#> box
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(...) {}
)
}