Skip to content

Shiny Dashboard Box Title's Colour Set With box_bg #14

@MShields1986

Description

@MShields1986

When using adminlte_global's box_bg arguement it sets the colour for every boxes title test to be the same as the background, rendering them undreadable.

Theme that will hide titles

my_theme <- create_theme(
    adminlte_color(
        light_blue = "#1e232b"
    ),
    adminlte_sidebar(
        width = "400px",
        dark_bg = "#1e232b",
        dark_hover_bg = "#1e232b",
        dark_color = "#1e232b"
    ),
    adminlte_global(
        content_bg = "#1e232b",
        box_bg = "#363e4d",
        info_box_bg = "#9ebeff"
    )
)

Theme that will not hide titles but retains the default box background colour

my_theme <- create_theme(
    adminlte_color(
        light_blue = "#1e232b"
    ),
    adminlte_sidebar(
        width = "400px",
        dark_bg = "#1e232b",
        dark_hover_bg = "#1e232b",
        dark_color = "#1e232b"
    ),
    adminlte_global(
        content_bg = "#1e232b",
        #box_bg = "#363e4d",
        info_box_bg = "#9ebeff"
    )
)

Example use

    dashboardBody(use_theme(my_theme),
        fluidRow(
            box(
                title = "I Change Colour", status = "primary", solidHeader = FALSE,
                collapsible = TRUE, width=12,
                valueBoxOutput("some_value_box", width=6)
            )
        )
    )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions