customTextInput: Create a custom Shiny text input

Description Usage Arguments Value Examples

Description

This is to showcase how to develop Shiny custom inputs (see Chapter 5.4)

Usage

1
2
3
4
5
6
7
8
customTextInput(
  inputId,
  label,
  value = "",
  width = NULL,
  placeholder = NULL,
  binding_step
)

Arguments

inputId

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

label

Display label for the control, or NULL for no label.

value

Initial value.

width

The width of the input, e.g. '400px', or '100%'; see validateCssUnit.

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.

binding_step

This parameter is only for the book purpose. This is to be able to follow each step of the input binding creation of Chapter 5.4. When you develop your own template, you don't need this. Provides the fully working binding instead!

Value

A text input control that can be added to a UI definition.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
if (interactive()) {
library(shiny)

 # This example corresponds to section 5.4.2.1 (Find the input)
 customTextInputExample(1)

 # This example corresponds to section 5.4.2.3 (Get the value)
 customTextInputExample(2)

 # This example corresponds to section 5.4.2.6 (Setting rate policies). At that
 # stage, the binding is fully working
 customTextInputExample(6)
}

DivadNojnarg/outstanding-shiny-ui-code documentation built on Nov. 2, 2021, 12:03 p.m.