Learn R Programming

⚠️There's a newer version (0.9.0) of this package.Take me there.

shinyWidgets

Extend widgets available in shiny

Overview

This package provide some custom widgets to pimp your shiny apps !

Installation :

# From CRAN
install.packages("shinyWidgets")

# From Github
# install.packages("devtools")
devtools::install_github("dreamRs/shinyWidgets")

Demo :

shinyWidgets::shinyWidgetsGallery()

Or see the live version here : https://dreamrs-vic.shinyapps.io/shinyWidgets/

You can find an introduction (in french) here.

And how to construct a palette color picker here.

Widgets available :

Bootstrap switch

Turn checkboxes into toggle switches :

switchInput(inputId = "id", value = TRUE)

Material switch

Turn checkboxes into toggle switches (again) :

materialSwitch(inputId = "id", label = "Primary switch", status = "primary", right = TRUE)

Select picker

Dropdown menu with a lot of options :

pickerInput(
  inputId = "id", 
  label = "Select/deselect all options", 
  choices = LETTERS, options = list(`actions-box` = TRUE), 
  multiple = TRUE
 )

Checkbox and radio buttons

Turn buttons into checkbox or radio :

checkboxGroupButtons(
  inputId = "somevalue", label = "Make a choice :", 
  choices = c("Choice A", "Choice B", " Choice C", "Choice D"), 
  justified = TRUE, status = "primary",
  checkIcon = list(yes = icon("ok", lib = "glyphicon"), no = icon("remove", lib = "glyphicon"))
)

Search bar

A text input only triggered by hitting 'Enter' or clicking search button :

searchInput(
  inputId = "id", 
  label = "Enter your search :", 
  placeholder = "This is a placeholder", 
  btnSearch = icon("search"), 
  btnReset = icon("remove"), 
  width = "100%"
)

Dropdown button

Hide input in a button :

dropdownButton(
  tags$h3("List of Input"),
  selectInput(inputId = 'xcol', label = 'X Variable', choices = names(iris)),
  selectInput(inputId = 'ycol', label = 'Y Variable', choices = names(iris), selected = names(iris)[[2]]),
  sliderInput(inputId = 'clusters', label = 'Cluster count', value = 3, min = 1, max = 9),
  circle = TRUE, status = "danger", icon = icon("gear"), width = "300px",
  tooltip = tooltipOptions(title = "Click to see inputs !")
)

And others !

Copy Link

Version

Install

install.packages('shinyWidgets')

Monthly Downloads

57,341

Version

0.3.4

License

GPL-3 | file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Victor Perrier

Last Published

August 15th, 2017

Functions in shinyWidgets (0.3.4)

awesomeRadio

Awesome Radio Buttons Input Control
checkboxGroupButtons

Buttons Group checkbox Input Control
circleButton

Circle Action button
colorSelectorInput

Color Selector Input
animateOptions

Animate options
animations

Animation names
awesomeCheckbox

Awesome Checkbox Input Control
awesomeCheckboxGroup

Awesome Checkbox Group Input Control
materialSwitch

Material Design Switch Input Control
multiInput

Create a multiselect input control
dropdown

Dropdown
dropdownButton

Dropdown Button
switchInput

Bootstrap Switch Input Control
updateCheckboxGroupButtons

Change the value of a checkboxes group buttons input on the client
actionBttn

Awesome action button
actionGroupButtons

Actions Buttons Group Inputs
receiveSweetAlert

Display a Sweet Alert
searchInput

Search Input
shinyWidgets

shinyWidgets: Custom inputs widgets for Shiny.
updateMaterialSwitch

Change the value of a materialSwitch input on the client
textInputAddon

Text with Add-on Input Control
progressBar

Progress Bars
radioGroupButtons

Buttons Group Radio Input Control
tooltipOptions

Tooltip options
updateAwesomeCheckbox

Change the value of an awesome checkbox input on the client
updatePickerInput

Change the value of a select picker input on the client
panel

Create a panel
pickerInput

Select picker Input Control
updateAwesomeCheckboxGroup

Change the value of a AwesomeCheckboxGroup input on the client
updateProgressBar

Update a progress bar
shinyWidgetsGallery

Launch the shinyWidget Gallery
updateAwesomeRadio

Change the value of a radio input on the client
updateRadioGroupButtons

Change the value of a radio group buttons input on the client
updateSwitchInput

Change the value of a switch input on the client