hover_action_button: Action button with button and icon animations

Description Usage Arguments Source Examples

View source: R/hover_action_button.R

Description

Animate an actionButton and it's icon using Hover.css

Usage

1
2
3
4
5
6
7
8
9
hover_action_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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
if (interactive()) {
  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)
}

Example output



hover documentation built on March 21, 2021, 1:06 a.m.