Create a React-based input
The input
slot that will be used to access the value.
Space-delimited list of CSS class names that should identify this input type in the browser.
HTML dependencies to include in addition to those supporting React. Must contain at least one dependency, that of the input's implementation.
Initial value.
Static configuration data.
Function to generate an HTML element to contain the input.
Shiny input suitable for inclusion in a UI.
myInput <- function(inputId, default = "") {
# The value of createReactShinyInput should be returned from input constructor functions.
createReactShinyInput(
inputId,
"myinput",
# At least one htmlDependency must be provided -- the JavaScript implementation of the input.
htmlDependency(
name = "my-input",
version = "1.0.0",
src = "www/mypackage/myinput",
package = "mypackage",
script = "myinput.js"
),
default
)
}