README.md

Travis-CI Build Status

textillate

textillate.js for R.

Dependencies

Examples

RMarkdown

textillate(
  "Textillate"
)

textillate(
  "Effects", 
  `in` = list(
    effect = "rollIn"
  )
)

# Pass options as list
textillate(
  "Duration and effect", 
  `in` = list(
    effect = "flipInX"
  ), 
  min.display.time = 5000
)

# Or pipe
textillate(
    "Duration and effect", 
    min.display.time = 5000
  ) %>%
  textillateIn(
    effect = "flipInX",
    delay = 1000,
    shuffle = TRUE
  )

Shiny

proxies

if(interactive()){
  library(shiny)

  ui <- fluidPage(
    actionButton(
      "start",
      "start"
    ),
    actionButton(
      "stop",
      "stop"
    ),
    actionButton(
      "in",
      "in"
    ),
    actionButton(
      "out",
      "out"
    ),
    textillateOutput('textillate')
  )

  server <- function(input, output){
    output$textillate <- renderTextillate({
      textillate("Click to start", auto.start = FALSE) %>%
        textillateIn(effect = "fadeIn") %>%
        textillateOut(effect = "bounce")
    })

    observeEvent(input$start, {
      textillateProxy("textillate") %>%
        textillateStartProxy()
    })

    observeEvent(input$start, {
      textillateProxy("textillate") %>%
        textillateStopProxy()
    })

    observeEvent(input$start, {
      textillateProxy("textillate") %>%
        textillateInProxy()
    })

    observeEvent(input$out, {
      textillateProxy("textillate") %>%
        textillateOutProxy()
    })
  }

  shinyApp(ui, server)
}


JohnCoene/textillate documentation built on May 9, 2019, 8:03 p.m.