hover_reload_button {hover}R Documentation

Reload button with button and icon animations

Description

Animate a reload button and it's icon using Hover.css Note that a reload button is just a shiny::actionButton with onClick behavior to reload or refresh a web browser.

Usage

hover_reload_button(
  inputId,
  label,
  icon = NULL,
  button_animation = NULL,
  icon_animation = NULL,
  width = NULL,
  ...
)

Arguments

inputId

The input slot that will be used to access the value.

label

The contents of the button or link–usually a text label, but you could also use any other HTML, like an image.

icon

An optional icon() to appear on the button.

button_animation

The name of the button animation.

icon_animation

The name of the icon animation.

width

The width of the input, e.g. '400px', or '100%'; see validateCssUnit().

...

Named attributes to be applied to the button or link.

Source

https://github.com/IanLunn/Hover

Examples

if (interactive()) {
  library(shiny)
  library(hover)

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

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

  }

  shinyApp(ui, server)
}

[Package hover version 0.1.1 Index]