aos

▶️ AOS - Animate on Scroll R Shiny and Rmarkdown

https://github.com/lgnbhl/aos

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.3%) to scientific vocabulary

Keywords

animation aos r r-package shiny
Last synced: 6 months ago · JSON representation

Repository

▶️ AOS - Animate on Scroll R Shiny and Rmarkdown

Basic Info
Statistics
  • Stars: 8
  • Watchers: 1
  • Forks: 1
  • Open Issues: 1
  • Releases: 0
Topics
animation aos r r-package shiny
Created almost 6 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

README.md

CRAN status Grand total R-CMD-check LinkedIn <!-- badges: end -->

aos

Animate on Scroll Library for Shiny

aos allows to animate on scroll elements in R Shiny thanks to AOS - Animate On Scroll.

Installation

Install the released version from CRAN.

r install.packages("aos")

To get a bug fix, or use a feature from the development version, you can install it from GitHub.

``` r

install.packages("remotes")

remotes::install_github("lgnbhl/aos") ```

Shiny

In order to use the aos package, you must first call use_aos() in the apps’ UI.

Then simply apply aos() to any Shiny element with an animation and other arguments such as duration, delay or easing.

``` r library(shiny) library(tidyverse) library(ggrepel) library(aos)

shinyApp( ui = fluidPage( align = "center", useaos(disable = "mobile"), # add useaos() in the UI aos( element = h1("AOS - Animation On Scroll"), animation = "fade-zoom-in", duration = "1000"), aos(textOutput("text"), animation = "fade-up"), aos( element = shiny::actionButton( inputId = "button", label = "See live demo", onclick = "window.open('http://michalsnik.github.io/aos/', '_blank')"), animation = "fade-up", duration = "3000") ), server <- function(input, output, session) { output$text <- renderText({ print("An animated text.") }) } ) ```

The function aos() doesn’t work (yet) with htmlwidgets.

Customize your animations

The use_aos() allows to parameter global settings as well as overrid default aos() arguments.

For example, you can change the offset to trigger animations later (200px instead of the default 120px), the duration of the animations (600ms instead of 400ms), the easing (“ease-in-sine” instead of “ease”), the delay (300ms instead of 0ms) or disable the animation for mobile phones (global setting).

r aos::use_aos( offset = "200", duration = "600", easing = "ease-in-sine", delay = "300", disable = "mobile" )

Check out the aos documentation to learn about all the attributes available for use_aos() and aos().

The arguments duration and delay accept only values from “50” to “3000”, with step 50ms.

The attribute anchor_placement allows to set different placement option, for example top-center, i.e. the animation will be triggered when top of element will reach center of the window.

R Markdown

To animate a element of a R Markdown document, you must first call use_aos() inside a R code chunk with {r, echo = FALSE} so the code will not be shown in the final document.

r {r, echo = FALSE} aos::use_aos()

Then you can animate any content of your R Markdown document using the ::: markers of the rmarkdown package followed by {data-aos="ANIMATION_EFFECT" data-aos-ARGUMENT="ARGUMENT_OPTION"}. The animation effects are listed in the documentation here.

Below an example with the “fade-up” animation with other arguments.

md ::: {data-aos="fade-up" data-aos-duration="2000" data-aos-offset="0"} This element will be animated. :::

Owner

  • Name: Félix Luginbuhl
  • Login: lgnbhl
  • Kind: user
  • Location: Switzerland

R and data viz

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 15
  • Total Committers: 1
  • Avg Commits per committer: 15.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 5
  • Committers: 1
  • Avg Commits per committer: 5.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
lgnbhl f****l@p****h 15
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 1
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • albert-ying (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 184 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
cran.r-project.org: aos

Animate on Scroll Library for 'shiny'

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 184 Last month
Rankings
Stargazers count: 19.8%
Forks count: 28.8%
Dependent packages count: 29.8%
Average: 34.3%
Dependent repos count: 35.5%
Downloads: 57.8%
Last synced: 6 months ago