Skip to content

bmoretz/shiny.gentelella

Repository files navigation

shiny.gentelella

R-CMD-check Lifecycle: experimental codecov

The goal of shiny.gentelella is to provide a simple, object-oriented application framework styled using the open-source bootstrap4 theme, gentelella.

Installation

You can install the development version of shiny.gentelella like so:

remotes::install_github("bmoretz/shiny.gentelella")

Example

This is a simple example that shows you how to setup a single page dashboard:

library(shiny.gentelella)
#> Loading required package: shiny

ExampleDashboard <- R6::R6Class(
  classname = "ExampleDashboard",
  inherit = Dashboard,
  public = list(

    #' @field meta page attributes
    #' and configuration wrapper.
    meta = list(
      title = "Example Dashbaord",
      nav_definition = system.file("example",
                                   "navigation.yml",
                                   package = "shiny.gentelella")
    ),

    #' @description
    #' Create a new UI Page object.
    #' @return A new `ExampleDashboard` object.
    initialize = function() {
      super$initialize()
    },

    #' @description user-interface wrapper.
    ui = function() {
      self$layout()
    },

    #' @description server-side wrapper.
    #' @param input form input
    #' @param output render output
    #' @param session page session
    server = function(input, output, session) {

      private$set_logging()
      logger::log_trace("processing server events")
    }
  ),
  private = list()
)

example <- ExampleDashboard$new()

# Run the application
app <- shinyApp(ui = example$ui(),
                server = example$server)

# runApp(app, port = 8080)

alt text here

About

A R/Shiny adaptation of the gentelella bootstrap4 theme.

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published