https://github.com/etiennebacher/circletyper
Curve Text Elements in R Shiny Using 'CircleType.js'
https://github.com/etiennebacher/circletyper
Last synced: 26 days ago
JSON representation
Curve Text Elements in R Shiny Using 'CircleType.js'
- Host: GitHub
- URL: https://github.com/etiennebacher/circletyper
- Owner: etiennebacher
- License: other
- Created: 2020-12-25T18:08:19.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-09-21T07:25:06.000Z (over 2 years ago)
- Last Synced: 2025-03-15T00:51:58.318Z (about 1 month ago)
- Language: R
- Homepage:
- Size: 69.3 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - etiennebacher/circletyper - Curve Text Elements in R Shiny Using 'CircleType.js' (R)
README
---
output: github_document
---# circletyper
[](https://github.com/etiennebacher/circletyper/actions)
[](https://CRAN.R-project.org/package=circletyper)The goal of `{circletyper}` is to enable text curving in Shiny apps, by adapting
[CircleType.js](https://github.com/peterhry/CircleType) into R.## Installation
For now, you can only install the development version of
`{circletyper}`:```{r eval = FALSE}
# install.packages("devtools")
devtools::install_github("etiennebacher/circletyper")
```## Example
```{r eval = FALSE}
library(shiny)
library(magrittr)
library(circletyper)ui <- fluidPage(
use_circletype(), # load dependencies# Wrap the text element you want to curve into circletype()...
circletype(h2("this is a title", id = "testh2"), dir = -1, radius = 200),# ... or use magrittr's pipe
strong("this is a bold text", id = "teststrong") %>% circletype(dir = 1),br(),
actionButton("remove", "remove circletype effect")
)server <- function(input, output, session) {
# You can also remove the circletype effect
observeEvent(input$remove, {
remove_circletype("teststrong")
})}
shinyApp(ui, server)
```| Initial | After clicking on the button |
| -------------------- | ---------------------------- |
|  |  |