twTextAreaInput {shiny.tailwind} | R Documentation |
Wrapper around shiny::textAreaInput()
but allowing for more classes
Description
Wrapper around shiny::textAreaInput()
but allowing for more classes
Usage
twTextAreaInput(
inputId,
label,
value = "",
placeholder = NULL,
width = NULL,
height = NULL,
rows = NULL,
cols = NULL,
resize = NULL,
container_class = NULL,
label_class = NULL,
input_class = NULL,
label_after_input = FALSE
)
Arguments
inputId |
The |
label |
Display label for the control, or |
value |
Initial value. |
placeholder |
A character string giving the user a hint as to what can be entered into the control. Internet Explorer 8 and 9 do not support this option. |
width |
The width of the input, e.g. |
height |
The height of the input, e.g. |
rows |
The value of the visible character rows of the input, e.g. |
cols |
Value of the visible character columns of the input, e.g. |
resize |
Which directions the textarea box can be resized. Can be one of
|
container_class |
additional classes to be applied to the container |
label_class |
additional classes to be applied to the label |
input_class |
additional classes to be applied to the input element |
label_after_input |
TRUE/FALSE if the label should be put after the input box. Default is FALSE. Useful for special cases (floating labels), c.f. 04-shiny-inputs example app. |
Value
a list with a shiny.tag
class
See Also
Examples
shiny::textAreaInput("id", "Label",
value = "The value", width = "200px",
placeholder = "Placeholder"
)
twTextAreaInput("id", "Label",
value = "The value", width = "200px",
height = "200px", placeholder = "Placeholder",
container_class = "CONTAINER", label_class = "LABEL", input_class = "INPUT"
)
# basic full shiny example
library(shiny)
ui <- fluidPage(
use_tailwind(),
twTextAreaInput(
"text", "A Text",
placeholder = "Here goes a placeholder",
width = "400px", height = "400px",
# Apply tailwind classes
container_class = "w-48 m-4 p-2 border border-gray-200 rounded-md drop-shadow-md",
label_class = "font-serif text-gray-600",
input_class = "drop-shadow-lg font-mono text-gray-600 rounded-md border-amber-400"
),
verbatimTextOutput("value")
)
server <- function(input, output) {
output$value <- renderText(input$text)
}
if (interactive()) shiny::shinyApp(ui_basic, server)