View source: R/twTextAreaInput.R
twTextAreaInput | R Documentation |
shiny::textAreaInput()
but allowing for more classesWrapper around shiny::textAreaInput()
but allowing for more classes
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 )
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. |
a list with a shiny.tag
class
shiny::textAreaInput()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.