Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

circleButton

Circle Action button


Description

Create a rounded action button.

Usage

circleButton(inputId, icon = NULL, status = "default", size = "default", ...)

Arguments

inputId

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

icon

An icon to appear on the button.

status

Color of the button.

size

Size of the button : default, lg, sm, xs.

...

Named attributes to be applied to the button.

Examples

if (interactive()) {
  library(shiny)
  library(shinyWidgets)

  ui <- fluidPage(
    tags$h3("Rounded actionBution"),
    circleButton(inputId = "btn1", icon = icon("gear")),
    circleButton(
      inputId = "btn2",
      icon = icon("sliders"),
      status = "primary"
    ),
    verbatimTextOutput("res1"),
    verbatimTextOutput("res2")
  )

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

    output$res1 <- renderPrint({
      paste("value button 1:", input$btn1)
    })
    output$res2 <- renderPrint({
      paste("value button 2:", input$btn2)
    })

  }

  shinyApp(ui, server)
}

shinyWidgets

Custom Inputs Widgets for Shiny

v0.6.0
GPL-3
Authors
Victor Perrier [aut, cre, cph], Fanny Meyer [aut], David Granjon [aut], Ian Fellows [ctb] (Methods for mutating vertical tabs & updateMultiInput), Wil Davis [ctb] (numericRangeInput function), Spencer Matthews [ctb] (autoNumeric methods), JavaScript and CSS libraries authors [ctb, cph] (All authors are listed in LICENSE.md)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.