dreamRs / reactwidgets

Extra React Widgets for Shiny applications
Other
5 stars 0 forks source link
r shiny widgets

reactwidgets

Lifecycle: experimental R-CMD-check

Extra widgets powered by React for Shiny applications.

Installation

You can install the development version of reactwidgets from GitHub with:

# install.packages("remotes")
remotes::install_github("dreamRs/reactwidgets")

Dual Listbox

From react-dual-listbox

dualListBoxInput(
  "ID",
  label = "Dual list box with options example:",
  options = prepareDualListBoxOptions(list(
    earth = list("luna"),
    mars = c("phobos", "deimos"),
    jupiter = c("io", "europa", "ganymede", "callisto")
  )),
  canFilter = TRUE,
  showOrderButtons = TRUE,
  preserveSelectOrder = TRUE,
  alignActions = "top",
  width = "100%"
)

dualListBoxInput

Select

From react-select

reactSelectInput(
  "ID2",
  label = "Multi react select example:",
  options = prepareReactSelectOptions(list(
    earth = list("luna"),
    mars = c("phobos", "deimos"),
    jupiter = c("io", "europa", "ganymede", "callisto")
  )),
  selected = "ganymede",
  placeholder = "Search for an option by typing",
  isMulti = TRUE,
  isSearchable = TRUE,
  width = "100%"
)

reactSelect