Create a React-based input
createReactShinyInput( inputId, class, dependencies, default = NULL, configuration = list(), container = htmltools::tags$div )
inputId | The |
---|---|
class | Space-delimited list of CSS class names that should identify this input type in the browser. |
dependencies | HTML dependencies to include in addition to those supporting React. Must contain at least one dependency, that of the input's implementation. |
default | Initial value. |
configuration | Static configuration data. |
container | 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 ) }