Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ColinFay/darkmode
'darkmode.js' for 'Shiny'
https://github.com/ColinFay/darkmode
Last synced: 9 days ago
JSON representation
'darkmode.js' for 'Shiny'
- Host: GitHub
- URL: https://github.com/ColinFay/darkmode
- Owner: ColinFay
- License: other
- Created: 2019-11-26T09:45:59.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-26T12:42:16.000Z (over 1 year ago)
- Last Synced: 2024-08-13T07:15:24.660Z (4 months ago)
- Language: R
- Size: 732 KB
- Stars: 19
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - ColinFay/darkmode - 'darkmode.js' 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%",
eval = TRUE
)
```# darkmode
[![R-CMD-check](https://github.com/ColinFay/darkmode/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ColinFay/darkmode/actions/workflows/R-CMD-check.yaml)
The goal of darkmode is to provide a wrapper for [Darkmode.js](https://github.com/sandoche/Darkmode.js) in `{shiny}`.
## Installation
You can install the released version of darkmode from GitHub with
``` r
pak::pak("colinfay/darkmode")
```## 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 echo = FALSE}
unloadNamespace("darkmode")
``````{r}
covr::package_coverage()
```## Example
```{r example, eval = FALSE}
library(darkmode)
library(shiny)
ui <- function(request){
fluidPage(
with_darkmode(),
h2("Plop"),
tableOutput("bing")
)
}server <- function(
input,
output,
session
){output$bing <- renderTable({
head(iris)
})
}shinyApp(ui, server)
```You can set parameters for the darkmode:
```{r example2, eval = FALSE}
library(darkmode)
library(shiny)
ui <- function(request){
fluidPage(
with_darkmode(label = "🤘"),
h2("Plop"),
tableOutput("bing")
)
}server <- function(
input,
output,
session
){output$bing <- renderTable({
head(iris)
})
}shinyApp(ui, server)
```![](readmefigs/darkmode.gif)