CSS Animations for 'shiny' Button Elements

A wrapper around a CSS library called 'Hover.css', intended for use in 'shiny' applications.


hover

R buildstatus Codecov testcoverage CRANstatus

The goal of hover is to add animations to shiny::actionButton, shiny::downloadButton, and shiny::icon using Hover.css. Additionally, a button to refresh web browser is also included.

Installation

Install the released version of hover from CRAN:

install.packages("hover")

Or install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("r4fun/hover")

Example

Animate a button and icon by providing the animation name:

library(shiny)
library(hover)

ui <- fluidPage(
  use_hover(),
  hover_action_button(
    inputId = "btn",
    label = "hello hover!",
    icon = icon("refresh"), 
    button_animation = "rotate", 
    icon_animation = "spin"
  ) 
)

server <- function(input, output, session) {
  
}

shinyApp(ui, server)

The hover package essentially takes the shiny::actionButton source code and applies the necessary Hover.css classes to make things move.

Acknowledgements

This package was built using the following tools:

  • Hover.css, the underlying CSS
  • shiny, the source code for hover_button

Without these, this package wouldn’t have been possible.

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("hover")

0.1.1 by Tyler Littlefield, 6 years ago


https://github.com/r4fun/hover


Report a bug at https://github.com/r4fun/hover/issues


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


Authors: Tyler Littlefield [aut, cre] (Creator of Shiny Wrapper) , Ian Lunn [ctb, cph] (Author of included CSS code) , Danube Huynhle [ctb]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports shiny, htmltools

Suggests testthat


See at CRAN