textAreaInputs: Create Tabular Text Area Input Controls

Description Usage Arguments Value Author(s) Examples

Description

Create text area inputs, similar to textInput, but may be sized as a box to allow for larger (paragraph) inputs.

Usage

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

textArea_row(
  inputId,
  label = "",
  value = "",
  leftLabel = TRUE,
  ...,
  disabled = FALSE,
  hidden = FALSE
)

Arguments

inputId

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

label

Display label for the control, or "" for no label.

value

The initial text to be shown in the text box.

leftLabel

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

...

Additional named arguments to paste into the text area tag. Some recommended tags: rows (determines how many lines of text are displayed in the box); cols The width of the text box. Unnamed arguments will be ignored.

Value

textArea_cell returns a character vector the length of inputId.

textArea_row returns a data frame with two columns and a row for every element in inputId

Author(s)

Benjamin Nutter

Examples

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

## End(Not run)

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