Learn R Programming

nessy

A NES css for Shiny.

Note: I did not code the CSS, but brought an existing one to Shiny. Give the original css a star if you like it!

Install

#install.packages("remotes")
remotes::install_github("ColinFay/nessy")

Init

Starting point

Every new page is launched by the cartridge() function. It’s more or less equivalent to shiny::fluidPage(), but with NES CSS loaded.

library(nessy)

ui <- cartridge(
  title = "{nessy}",
  subtitle = "NES-style CSS Framework for Shiny.",
  footer = "{nessy}, based on NES.css"
)

server <- function(input, output, session) {
  
}

shiny::shinyApp(ui, server)
  

New container

You can simply pass along a tagList() of objects. The framed areas are launched by the container, container_simple and container_with_title functions.

library(nessy)

ui <- cartridge(
  title = "{nessy}",
  container_with_title(
      "a container", 
      octocat_animate()
  )
)

server <- function(input, output, session) {
  
}

shiny::shinyApp(ui, server)
  

UI Elements

There are five different buttons & a radio_buttons():

ui <- cartridge(
  title = "{nessy}",
  container_with_title(
    title = "Buttons",
    button("Normal", "Normal"),
    button_primary("Primary", "Primary"),
    button_success("Success", "Success"),
    button_warning("Warning", "Warning"),
    button_error("Error", "Error"),
    radio_buttons("sure", "Are you sure?", c("yes", "no"))
  )
)

server <- function(input, output, session) {
  
}

shiny::shinyApp(ui, server)

You can also find:

  • Balloons
  • Checkbox
  • Text Input
  • Various Icons

Example

nessy_examples() returns the path to all available examples.

nessy::nessy_examples()
#> [1] "app2.R"       "app3.R"       "app4.R"       "exampleapp.R"

You can then:

shiny::runApp(nessy_examples("exampleapp.R"))

Please note that the ‘nessy’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Copy Link

Version

Version

0.0.0.9001

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

May 29th, 2019

Functions in nessy (0.0.0.9001)

checkbox

Create a NES Checkbox
text_input

Somewhere to enter text
cartridge

Create a new NES Themed Shiny App
radio_buttons

A Nessy Radio button
nessy_examples

Get a NES example
radio_button

A Nessy Radio button
container

Customisable containers
heart

Various 8 bit icons
button

Create a button
balloon_container

Ballons container and div