Description Usage Arguments Value Examples
Use aos
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
disable |
string. Condition when AOS should be disabled, for example 'mobile' |
startEvent |
string. Name of the event dispatched on the document, that AOS should initialize on |
initClassName |
string. Class applied after initialization |
animatedClassName |
string. Class applied on animation |
useClassNames |
boolean. If true, will add content of data-aos as classes on scroll |
disableMutationObserver |
boolean. Disables automatic mutations detections (advanced) |
debounceDelay |
string. The delay on debounce used while resizing window (advanced) |
throttleDelay |
string. The delay on throttle used while scrolling the page (advanced) |
offset |
string. Change offset to trigger animations sooner or later, in px |
duration |
string. Duration of animation in ms. |
easing |
string. Timing function to animate elements nicely |
delay |
string. Delay animation (ms) |
Javascript code initializing aos with dependencies.
1 2 3 4 5 6 7 8 9 10 11 12 13 | if (interactive()) {
library(shiny)
shinyApp(
ui = fluidPage(
use_aos(), # add use_aos() in the UI
aos(h1("Shiny with AOS - Animate On Scroll"), animation = "fade-zoom-in"),
aos(textOutput("text"), animation = "fade-up")
),
server <- function(input, output, session){
output$text <- renderText({ print("An animated text.") })
}
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.