f7TextArea | R Documentation |
f7TextArea
creates a f7 text area input.
updateF7TextArea
changes the value of a text area input on the client.
f7TextArea(inputId, label, value = "", placeholder = NULL, resize = FALSE) updateF7TextArea( inputId, label = NULL, value = NULL, placeholder = NULL, session = shiny::getDefaultReactiveDomain() )
inputId |
The id of the input object. |
label |
The label to set for the input object. |
value |
The value to set for the input object. |
placeholder |
The placeholder to set for the input object. |
resize |
Whether to box can be resized. Default to FALSE. |
session |
The Shiny session object, usually the default value will suffice. |
if(interactive()){ library(shiny) library(shinyMobile) shinyApp( ui = f7Page( title = "My app", f7TextArea( inputId = "textarea", label = "Text Area", value = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua", placeholder = "Your text here", resize = TRUE ), textOutput("value") ), server = function(input, output) { output$value <- renderText({ input$textarea }) } ) } if (interactive()) { library(shiny) library(shinyMobile) ui <- f7Page( f7SingleLayout( navbar = f7Navbar(title = "updateF7TextArea"), f7Block(f7Button("trigger", "Click me")), f7TextArea( inputId = "textarea", label = "Text Area", value = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua", placeholder = "Your text here", resize = TRUE ), verbatimTextOutput("value") ) ) server <- function(input, output, session) { output$value <- renderPrint(input$textarea) observeEvent(input$trigger, { updateF7Text("textarea", value = "Updated Text") }) } shinyApp(ui, server) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.