A Wrapper of the JavaScript Library 'Freewall'

Creates dynamic grid layouts of images that can be included in 'Shiny' applications and R markdown documents.


freewall

R-CMD-check

Dynamic grid layouts of images.


In a Shiny app, the items of a 'freewall' grid have the class ID-item where ID is the id you use in the freewallOutput function. Here is an example of a Shiny app with a CSS3 animation:

library(shiny)
library(freewall)

css <- "
#fw {
	margin: 15px;
}

@keyframes start {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

@-webkit-keyframes start {
  from {
    -webkit-transform: scale(0);
  }
  to {
    -webkit-transform: scale(1);
  }
}

#fw .fw-item[data-state='init'] {
  display: none;
}

#fw .fw-item[data-state='start'] {
  display: block;
  animation: start 1s;
  -webkit-animation: start 1s;
}

#fw .fw-item[data-state='move'] {
  transition: top 1s, left 1s, width 1s, height 1s;
  -webkit-transition: top 1s, left 1s, width 1s, height 1s;
}
"

ui <- fluidPage(
  tags$head(tags$style(HTML(css))),
  freewallOutput("fw")
)

server <- function(input, output, session) {
  output[["fw"]] <- renderFreewall({
    freewall(
      nature(), backgroundImages = TRUE,
      widths = 200, heights = 200,
      cellW = 200, cellH = 200,
      animate = FALSE, delay = 50
    )
  })
}

shinyApp(ui, server)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("freewall")

1.0.0 by Stéphane Laurent, 2 years ago


https://github.com/stla/freewall


Report a bug at https://github.com/stla/freewall/issues


Browse source code at https://github.com/cran/freewall


Authors: Stéphane Laurent [aut, cre] , Minh Nguyen [cph] (author of the JavaScript library 'Freewall')


Documentation:   PDF Manual  


GPL-3 license


Imports htmlwidgets, htmltools, jquerylib

Suggests shiny


See at CRAN