text-input: Add text input

text-inputR Documentation

Add text input

Description

Add text input.

Usage

bulmaTextInput(inputId, label = NULL, placeholder = "", color = NULL)

bulmaTextAreaInput(
  inputId,
  label = NULL,
  placeholder = "",
  rows = 1,
  color = NULL,
  size = NULL,
  disabled = FALSE,
  readonly = FALSE
)

bulmaUpdateTextInput(session, inputId, value = NULL)

Arguments

inputId

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

label

Input label.

placeholder

Input placeholder.

color

A valid bulma color, e.g.:success.

rows

Number of rows of text.

size

A valid bulma text size, small, medium or large.

disabled, readonly

Set to TRUE to disable or set on read-only.

session

A shiny session.

value

Value to update.

Author(s)

John Coene, jcoenep@gmail.com

Examples

if(interactive()){
library(shiny)

shinyApp(
  ui = bulmaNavbarPage(
   theme = "dark",
   bulmaTextInput("txt", label = "Input text", placeholder = "Type here"),
   verbatimTextOutput("txtOutput"),
   bulmaTextAreaInput("txtArea", rows = 10, label = "Input text area", 
                      color = "primary", size = "medium"),
   verbatimTextOutput("txtAreaOutput"),
   bulmaTextAreaInput("disabled", label = "disabled", disabled = TRUE, 
                      placeholder = "disabled"),
   bulmaActionButton("update", "Update text input")
  ),
  server = function(input, output, session) {
    output$txtOutput <- renderPrint({ input$txt })
    output$txtAreaOutput <- renderPrint({ input$txtArea })
    observeEvent( input$update, {
      updateTextInput(session, "txt", value = "Updated")
    })
  }
)
}

JohnCoene/shinybulma documentation built on Nov. 16, 2022, 6:42 p.m.