shiny R themes
Need help with dashboardthemes?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.
nik01010

Description

Now on CRAN: custom theme support for R Shinydashboard applications.

247 Stars 45 Forks Other 73 Commits 2 Opened issues

Services available

Need anything else?

dashboardthemes

Blog | Contact

An R package to provide custom theme options for Shinydashboard applications.

CRAN status Travis build status Codecov test coverage Stability: Active <!-- badges: end -->

blue_gradient boe_website grey_dark grey_light onenote poor_mans_flatly purple_gradient

Features

  • Straightforward use of a new set of themes and logos.

  • Easy creation of new themes and logos, without knowledge of CSS code.

  • Use of live theme switchers in apps (Guide available here).

  • Theme designer (Available here)

Installation

From CRAN:

R
install.packages("dashboardthemes")

From GitHub:

R
library(devtools)
install_github("nik01010/dashboardthemes")

Functions

| Function | Description | Input | Output | | ------------- |----------------------|----------------------|-------------------| | shinyDashboardThemes | Calls a custom theme created using shinyDashboardThemeDIY | Theme name | Theme settings object | | shinyDashboardLogo | Calls a custom logo created using shinyDashboardLogoDIY | Theme name and logo text | Logo settings object | | shinyDashboardThemeDIY | Creates a custom theme object | Size, colour and other settings for each UI element. See function documentation for input options | Theme settings object | | shinyDashboardLogoDIY | Creates a custom logo object. Inspired from here | Size and colour for the logo. See function documentation for input options | Logo settings object | | cssGradientThreeColors | Creates a three colour gradient to be used in themes | Gradient direction, colours, position of middle colour | CSS gradient |

Using logos

Use by inserting into the title parameter within the dashboardHeader part of an application. ```R

... ### ui ui <- dashboardPage(

### ui header
dashboardHeader(

changing logo

title = shinyDashboardLogo( theme = "blue_gradient", boldText = "Shiny", mainText = "App", badgeText = "v1.1" ) ...

Using themes

Use by inserting into the dashboardBody part of an application.

```R

...

ui body

dashboardBody(

### changing theme
shinyDashboardThemes(
  theme = "blue_gradient"
)

### ui tabs
,tabItems(
  tabItem(
    ...

Creating new logos

Example of creating a custom logo object. Each parameter can be changed as required. ```R

### creating custom logo object customLogo <- shinyDashboardLogoDIY(

boldText = "SD"
,mainText = "Themes"
,textSize = 16
,badgeText = "v1.1"
,badgeTextColor = "white"
,badgeTextSize = 2
,badgeBackColor = "#40E0D0"
,badgeBorderRadius = 3

)

### calling custom logo object in shinydashboard ... ### ui ui <- dashboardPage(

  ### ui header
  dashboardHeader(

### changing logo
title = customLogo
...

Creating new themes

Example of creating a custom theme object. Each parameter can be changed as required.

```R

creating custom theme object

customTheme

New themes

| Theme | Code | Description | | ------------------ |------------|-----------------------------------------------| | Blue gradient | bluegradient | Demonstrates use of gradients, shadows and rounded corners | | Flat Red | flatred | Flat colour theme with red highlights. | | Grey light | greylight | Simple, light theme using a grey colour schemes | | Grey dark | greydark | Demonstrates use of inverted dark colour schemes | | OneNote | onenote | Styled similarly to the OneNote application | | Poor man's Flatly | poormansflatly | Poor man's version of the Flatly theme | Purple gradient | purple_gradient | Demonstrates high use of gradients and a smaller sidebar |

Blue gradient

blue_gradient

Flat Red

boe_website

Grey light

grey_light

Grey dark

grey_dark

OneNote

onenote

Poor man's Flatly

poor_mans_flatly

Purple gradient

purple_gradient

Known issues

Some application components have not been fully customised:

  • Action button when pressed

  • Dropdown menu background

  • Popup menu and placeholder font colour in date inputs

  • Checkbox and radio buttons

Disclaimer

This is not part of the official Shinydashboard package and is released as a separate set of functionality. Efforts will be made to ensure compatibility with future versions of Shinydashboard but there could be delays in doing so.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.