Add beautiful text effects in your Shiny apps
The textyle
package allows to reproduce the beautiful text effects from Textyle.js in a Shiny app.
Install textyle from GitHub.
# install.packages("remotes") remotes::install_github("lgnbhl/textyle")
To animate a text, simply call textyle()
on any tag element from tags()
.
library(shiny) library(textyle) shinyApp( ui = fluidPage( align = "center", br(), br(), br(), textyle(tags$p("TEXTYLE", style = "font-size:7rem;font-weight:900;")), textOutput("text") ), server = function(input, output){ output$text <- renderText({ print("- Simple Text Effect -") }) } )
You can change the color, the easing (see jquery-easing for all options availables) or the speed of the text effect.
To reproduce the non colored effect, change the color to black and add class = "ex1"
in the function.
textyle(p("TEXTYLE"), color = "black", class = "ex1")
The reproduced text effects are taken from this codepen.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.