checkboxInputs: Tabluar Checkbox Control Elements

Description Usage Arguments Value Author(s) See Also Examples

Description

Produce the HTML code for a cell with a checkbox or a row of a two column table iwth a checkbox.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
checkboxInput_cell(
  inputId,
  label = "",
  value = FALSE,
  width = "",
  leftLabel = FALSE,
  disabled = FALSE,
  hidden = FALSE
)

checkboxInput_row(
  inputId,
  label = "",
  value = FALSE,
  width = "",
  leftLabel = FALSE,
  disabled = FALSE,
  hidden = FALSE
)

Arguments

inputId

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

label

Display label for the control. Defaults to "" for no label.

value

Initial value (TRUE or FALSE)

width

The width of the input, e.g. '400px' or '100%'. Defaults to "".

leftLabel

Should the label column be the left column or the right column. TRUE puts the label on the left column.

Value

checkboxInput_cell returns a character vector of HTML code, one element for each inputId.

checkboxInput_row returns a data frame with two columns and one row for each inputId.

Author(s)

Benjamin Nutter

See Also

checkboxInput

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
options(pixiedust_print_method = "html")
shinyApp(
  ui = shinyUI(
    wellPanel(uiOutput("sampleUI"))
  ),
  
  server = shinyServer(function(input, output){
    output$sampleUI <- 
      renderText({ 
        checkboxInput_row(inputId = paste0("car", 1:nrow(mtcars)),
                          label = rownames(mtcars)) %>%
                          dust() %>%
                          print(asis = FALSE)
      })
  })
)

## End(Not run)

nutterb/shinydust documentation built on Dec. 6, 2020, 8:13 a.m.