text_input: Create Semantic UI Text Input

Description Usage Arguments Details Examples

View source: R/input.R

Description

This creates a default text input using Semantic UI. The input is available under input[[input_id]].

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
text_input(
  input_id,
  label = NULL,
  value = "",
  type = "text",
  placeholder = NULL,
  attribs = list()
)

textInput(
  inputId,
  label,
  value = "",
  width = NULL,
  placeholder = NULL,
  type = "text"
)

Arguments

input_id

Input name. Reactive value is available under input[[input_id]].

label

character with label put on the left from the input

value

Pass value if you want to have default text.

type

Change depending what type of input is wanted. See details for options.

placeholder

Text visible in the input when nothing is inputted.

attribs

A named list of attributes to assign to the input.

inputId

Input name. The same as input_id.

width

The width of the input, eg. "40px"

Details

The following type s are allowed:

The inputs are updateable by using updateTextInput or updateTextAreaInput if type = "textarea".

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Only run examples in interactive R sessions
if (interactive()) {
  library(shiny)
  library(shiny.semantic)
  ui <- semanticPage(
    uiinput(
      text_input("ex", label = "Your text", type = "text", placeholder = "Enter Text")
    )
  )
  server <- function(input, output, session) {
 }
 shinyApp(ui, server)
 }

Example output



shiny.semantic documentation built on Nov. 7, 2021, 5:07 p.m.