if(interactive()){
library(shiny)
ui <- fluidPage(
style = "text-align: center;",
tags$label("same as original icon function"), br(),
animateIcon("house"), br(),
tags$label("Change animation and color"), br(),
animateIcon(
name = "house", animation = "horizontal", speed = "slow", color ="red"
), br(),
tags$label("work in a button"), br(),
actionButton(
"a", "a", icon = animateIcon("spinner", "spin", "fast")
), br(),
tags$label("hover your mouse on the next one"), br(),
animateIcon(
name = "wrench", animation = "wrench", hover = TRUE, color ="green"
), br(),
tags$label("change size"), br(),
animateIcon("house"),
animateIcon("house", size = "xs"),
animateIcon("house", size = "sm"),
animateIcon("house", size = "lg"),
animateIcon("house", size = "2x"),
animateIcon("house", size = "3x"),
animateIcon("house", size = "5x"),
animateIcon("house", size = "7x"),
animateIcon("house", size = "10x")
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
}
Run the code above in your browser using DataLab