wired_button: Wired Action Button

Description Usage Arguments Examples

View source: R/inputs.R

Description

Wired Action Button

Usage

1
2
wired_button(inputId, label = NULL, icon = NULL, elevation = 1,
  width = NULL, ...)

Arguments

inputId

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

label

The contents of the button or link–usually a text label.

icon

An optional icon to appear on the button.

elevation

Number between 1 and 5 (inclusive) that gives the button a sketchy height. Default value is 1.

width

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

...

Named attributes to be applied to the button.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
if (interactive()) {

  library(shiny)
  library(wired)

  ui <- fluidPage(
    wired_button(
      inputId = "button1",
      label = "GO!"
    ),
    tags$br(),
    verbatimTextOutput(outputId = "res1"),
    wired_button(
      inputId = "button2",
      elevation = 5,
      label = "Another button"
    ),
    tags$br(),
    verbatimTextOutput(outputId = "res2")
  )

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

    output$res1 <- renderPrint(input$button1)

    output$res2 <- renderPrint(input$button2)

  }

  shinyApp(ui, server)

}

dreamRs/wired documentation built on Nov. 19, 2019, 5 a.m.