fresh v0.1.0

0

Monthly downloads

0th

Percentile

Create Custom 'Bootstrap' Themes to Use in 'Shiny'

Customize 'Bootstrap' and 'Bootswatch' themes, like colors, fonts, grid layout, to use in 'Shiny' applications, 'rmarkdown' documents and 'flexdashboard'.

Readme

fresh

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

Lifecycle: experimental Project Status: Active – The project has reached a stable, usable state and is being actively developed. Travis build status Codecov test coverage

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"
  )
)

Functions in fresh

Name Description
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
No Results!

Vignettes of fresh

Name
figures/example_shiny.png
shiny.Rmd
No Results!

Last month downloads

Details

URL https://github.com/dreamRs/fresh
BugReports https://github.com/dreamRs/fresh/issues
License GPL-3
Encoding UTF-8
LazyData true
RoxygenNote 6.1.1
VignetteBuilder knitr
NeedsCompilation no
Packaged 2019-10-18 08:37:15 UTC; perri
Repository CRAN
Date/Publication 2019-10-21 14:00:02 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/fresh)](http://www.rdocumentation.org/packages/fresh)