Description Usage Arguments Value Examples
This is to showcase how to develop Shiny custom inputs (see Chapter 5.4)
1 2 3 4 5 6 7 8 | customTextInput(
inputId,
label,
value = "",
width = NULL,
placeholder = NULL,
binding_step
)
|
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! |
A text input control that can be added to a UI definition.
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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.