-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
85 lines (62 loc) · 2.24 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# vov <img src="man/figures/vov-logo.png" align="right" height=150/>
<!-- badges: start -->
[![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)
<!-- badges: end -->
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")
```