Learn R Programming

⚠️There's a newer version (0.2.1) of this package.Take me there.

fresh

Create fresh themes for use in {shiny} & {shinydashboard} applications and {flexdashboard} documents.

Installation

You can install the development version of fresh from GitHub with:

remotes::install_github("dreamRs/fresh")

shiny

Create new themes to use in shiny applications with fluidPage or navbarPage. From the default theme :

Obtain this :

This theme was creating with following code:

create_theme(
  theme = "default",
  bs_vars_navbar(
    default_bg = "#3f2d54",
    default_color = "#FFFFFF",
    default_link_color = "#FFFFFF",
    default_link_active_color = "#FFFFFF"
  ),
  bs_vars_color(
    gray_base = "#354e5c",
    brand_primary = "#75b8d1",
    brand_success = "#c9d175",
    brand_info = "#758bd1",
    brand_warning = "#d1ab75",
    brand_danger = "#d175b8"
  ),
  bs_vars_state(
    success_text = "#FFF",
    success_bg = "#c9d175",
    success_border = "#c9d175",
    info_text = "#FFF",
    info_bg = "#3f2d54",
    info_border = "#3f2d54",
    danger_text = "#FFF",
    danger_bg = "#d175b8",
    danger_border = "#d175b8"
  ),
  bs_vars_wells(
    bg = "#FFF",
    border = "#3f2d54"
  ),
  output_file = "www/mytheme.css"
)

Use the created theme like this:

navbarPage(
  
  title = "My application",
  theme = "mytheme.css",
  
  ...
)

shinydashboard

Customize colors used in Shiny dashboard applications :

From :

Obtain this :

With:

create_theme(
  adminlte_global(
    content_bg = "#FFF"
  ),
  adminlte_sidebar(
    dark_bg = "#80829a",
    dark_hover_bg = "#53486c"
  ),
  adminlte_color(
    light_blue = "#3f2d54",
    aqua = "#75b8d1",
    green = "#c9d175",
    red = "#d175b8",
    purple = "#3f2d54",
    yellow = "#d1ab75"
  )
)

Copy Link

Version

Install

install.packages('fresh')

Monthly Downloads

14,789

Version

0.1.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Victor Perrier

Last Published

October 21st, 2019

Functions in fresh (0.1.0)

adminlte_color

AdminLTE CSS colors variables
bs_vars_input

Bootstrap CSS input variables
bs_vars_modal

Bootstrap CSS modal variables
fresh

Fresh 'Shiny' Themes
bs_vars_button

Bootstrap CSS button variables
bs_vars_state

Bootstrap CSS states variables
bs_vars_badge

Bootstrap CSS badge variables
bs_vars_progress

Bootstrap CSS progress variables
use_googlefont

Use online Google font in Shiny application
bs_vars_color

Bootstrap CSS colors variables
bs_vars_navbar

Bootstrap CSS navbar variables
vars_file

SCSS variables from a file
use_vars_template

Use a template to define SCSS variables
bs_vars_nav

Bootstrap CSS nav variables
bs_vars_font

Bootstrap CSS font variables
bs_vars_tabs

Bootstrap CSS tabs variables
bs_vars_global

Bootstrap CSS global variables
bs_vars_wells

Bootstrap CSS wells variables
use_pretty

Use pretty-checkbox CSS in Shiny
use_theme

Use a CSS theme in Shiny application
bs_vars_dropdown

Bootstrap CSS dropdown variables
bs_vars_alert

Bootstrap CSS alert variables
adminlte_sidebar

AdminLTE CSS sidebar variables
bs_vars_panel

Bootstrap CSS panel variables
bs_vars_pills

Bootstrap CSS pills variables
create_theme

Create a custom Bootstrap theme
create_pretty

Create a custom CSS file for pretty-checkbox
adminlte_global

AdminLTE CSS global variables