Learn R Programming

hover (version 0.1.1)

use_hover: Use the hover package

Description

Enables hover by including the CSS file necessary for the animations.

Usage

use_hover(popback = FALSE)

Arguments

popback

If true, buttons 'pop back', contrary to default shiny behavior.

Details

By default, shiny buttons don't 'pop back'. This is for accessibility reasons. For more information see here: https://github.com/rstudio/shiny/issues/2500.

Examples

Run this code
# NOT RUN {
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)
}
# }

Run the code above in your browser using DataLab