Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tylerlittlefield/vov

:sparkles: vov.css animations for shiny
https://github.com/tylerlittlefield/vov

css css-animations r rstats shiny vov-css

Last synced: about 2 months ago
JSON representation

:sparkles: vov.css animations for shiny

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# vov

[![R build status](https://github.com/tyluRp/vov/workflows/R-CMD-check/badge.svg)](https://github.com/tyluRp/vov/actions)
[![CRAN status](https://www.r-pkg.org/badges/version/vov)](https://cran.r-project.org/package=vov)
[![CRAN_Download_Badge](https://cranlogs.r-pkg.org/badges/vov)](https://cran.r-project.org/package=vov)
[![Codecov test coverage](https://codecov.io/gh/tyluRp/vov/branch/master/graph/badge.svg)](https://codecov.io/gh/tyluRp/vov?branch=master)

The goal of vov is to wrap [vov.css](https://github.com/vaibhav111tandon/vov.css) into functions so they can be called on when developing a shiny application. Try out the demo [here](https://tylerlittlefield.com/shiny/tyler/vov/) or check out the original [here](https://vaibhav111tandon.github.io/vov.css/) by Vaibhav Tandon. Alternatively, you can run a local copy with `vov::run_demo()`.

```{r demo, echo=FALSE}
knitr::include_graphics("man/figures/README-demo.gif")
```

## Installation

Install the released version of `vov` from CRAN:

```r
install.packages("vov")
```

Or install the development version from GitHub with:

``` r
# install.packages("devtools")
devtools::install_github("tylurp/vov")
```

## Usage

You can use `vov` in a shiny app like so:

```{r, eval=FALSE}
library(shiny)
library(vov)

ui <- fluidPage(
use_vov(),
swivel_vertical(
h1("hello world!")
)
)

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

}

shinyApp(ui, server)
```

Where `swivel_vertical(h1("fade_in_bottom_left"))` returns:

```{r, echo=FALSE}
library(shiny)
library(vov)
```

```{r}
x <- swivel_vertical(h1("hello world!"))
print(x)
```

If you don't want to load this package, go to the original repo [here](https://github.com/vaibhav111tandon/vov.css), download the CSS file, and write something like this in your UI code:

```{r, eval=FALSE}
includeCSS("www/vov.css")
htmltools::tagAppendAttributes(h1("hello world"), class = "vov swivel-vertical")
```