# NOT RUN {
if (interactive()) {
# Basic animation of an element's
# opacity value (moving to a new
# `opacity` value of `0`)
SVG(width = 300, height = 300) %>%
svg_rect(
x = 50, y = 50,
width = 50, height = 50,
attrs = svg_attrs_pres(
stroke = "magenta",
fill = "lightblue"
),
anims = anims(
2.0 ~ anim_opacity(opacity = 0)
)
)
}
# }
Run the code above in your browser using DataLab