text-input: Add text input

Description Usage Arguments Author(s) Examples

Description

Add text input.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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. 23, 2021, 6:20 p.m.