https://github.com/ColinFay/skeleton
  
  
    Skeleton CSS for Shiny 
    https://github.com/ColinFay/skeleton
  
golemverse r shiny
        Last synced: 3 months ago 
        JSON representation
    
Skeleton CSS for Shiny
- Host: GitHub
 - URL: https://github.com/ColinFay/skeleton
 - Owner: ColinFay
 - License: other
 - Created: 2018-10-05T14:28:12.000Z (about 7 years ago)
 - Default Branch: master
 - Last Pushed: 2023-04-20T10:29:05.000Z (over 2 years ago)
 - Last Synced: 2024-08-13T07:14:38.435Z (about 1 year ago)
 - Topics: golemverse, r, shiny
 - Language: R
 - Homepage:
 - Size: 64.5 KB
 - Stars: 9
 - Watchers: 6
 - Forks: 3
 - Open Issues: 0
 - 
            Metadata Files:
            
- Readme: README.Rmd
 - License: LICENSE
 
 
Awesome Lists containing this project
- jimsghstars - ColinFay/skeleton - Skeleton CSS for Shiny (R)
 
README
          ---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```
# skeleton
[](https://github.com/ColinFay/skeleton/actions/workflows/R-CMD-check.yaml)
The goal of skeleton is to provide [Skeleton CSS](http://getskeleton.com/) for `{shiny}`.
## Installation
You can install the development version of `{skeleton}` from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("ColinFay/skeleton")
```
# skeleton
## About
You're reading the doc about version : `r pkgload::pkg_version()`
This README has been compiled on the
```{r}
Sys.time()
```
Here are the test & coverage results :
```{r}
devtools::check(quiet = TRUE)
```
```{r eval = TRUE, message = TRUE}
covr::package_coverage()
```
# Example
## Basic app
```{r eval = FALSE}
library(shiny)
library(skeleton)
ui <- sk_page(
  h1("Hello world"),
  sk_row(
    sk_col(6, "Hello"),
    sk_col(6, "World")
  ),
  sk_row(
    plotOutput("plot1")
  )
)
server <- function(input, output) {
  output$plot1 <- renderPlot({
    plot(mtcars)
  })
}
shinyApp(ui, server)
```
## Built-in dashboard
```{r eval = FALSE}
library(shiny)
library(skeleton)
ui <- sk_page(
  sk_header(
    h2("A dead simple, responsive boilerplate."),
  ),
  sk_nav(
    sk_nav_item(
      id = "one",
      title = "ONE",
      ui = sk_row(
        sk_col(
          6,
          "Hello plot1"
        ),
        sk_col(
          6,
          plotOutput("plot1")
        )
      )
    ),
    sk_nav_item(
      id = "two",
      title = "TWO",
      ui = sk_row(
        sk_col(
          6,
          plotOutput("plot2")
        ),
        sk_col(
          6,
          "Hello plot2"
        ),
      )
    ),
    sk_nav_item(
      id = "three",
      title = "THREE",
      ui = sk_row(
        sk_col(
          6,
          plotOutput("plot3")
        ),
        sk_col(
          6,
          "Hello plot3"
        ),
      )
    )
  )
)
shinyApp(ui, function(input, output) {
  output$plot1 <- renderPlot({
    plot(mtcars)
  })
  output$plot2 <- renderPlot({
    plot(airquality)
  })
  output$plot3 <- renderPlot({
    plot(pressure)
  })
})
```
## With golem
You can get a boilerplate of a page or a dashboard when creating an app with golem, using the built-in golem hooks:
```{r eval = FALSE}
golem::create_golem(
  "skboilerplate",
  project_hook = skeleton::ghook_sk_dashboard
)
golem::create_golem(
  "skdashboard",
  project_hook = skeleton::ghook_sk_boilerplate
)
```