shinyWidgets v0.4.8

0

Monthly downloads

0th

Percentile

Custom Inputs Widgets for Shiny

Collection of custom input controls and user interface components for 'Shiny' applications. Give your applications a unique and colorful style !

Readme

shinyWidgets

Extend widgets available in shiny

Travis-CI Build Status AppVeyor build status version cranlogs cran checks Coverage Status

Overview

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

You can replace classical checkboxes with switch button, add colors to radio buttons and checkbox group, use buttons as radio or checkboxes. Each widget has an update method to change the value of an input from the server.

Installation :

# From CRAN
install.packages("shinyWidgets")

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

Demo :

shinyWidgets::shinyWidgetsGallery()

A live version is available here : http://shinyapps.dreamrs.fr/shinyWidgets

Widgets available :

Bootstrap switch

Turn checkboxes into toggle switches :
switchInput

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

Material switch

Turn checkboxes into toggle switches (again) :
materialSwitch

materialSwitch(inputId = "id", label = "Primary switch", status = "danger")

Pretty Checkbox

Checkbox and radio buttons with the beautiful CSS library pretty-checkbox : prettycheckbox

prettyCheckbox(
  inputId = "pretty_1", label = "Check me!", icon = icon("check")
),
prettyCheckbox(
  inputId = "pretty_2", label = "Check me!", icon = icon("thumbs-up"), 
  status = "default", shape = "curve", animation = "pulse"
),
prettyCheckbox(
  inputId = "pretty_3", label = "Check me!", icon = icon("users"), 
  animation = "pulse", plain = TRUE, outline = TRUE
),
prettyCheckbox(
  inputId = "pretty_4", label = "Check me!",
  status = "success", outline = TRUE
),
prettyCheckbox(
  inputId = "pretty_5", label = "Check me!",
  shape = "round", outline = TRUE, status = "info"
),

...

Sweet Alert

Displays a message to the user :

sendSweetAlert

See examples in ?sendSweetAlert.

Request confirmation from the user :

confirmSweetAlert

See examples in ?confirmSweetAlert.

Slider Text

Slider with strings, to pass whatever you want :
sliderText

sliderTextInput(
  inputId = "mySliderText", 
  label = "Your choice:", 
  grid = TRUE, 
  force_edges = TRUE,
  choices = c("Strongly disagree",
              "Disagree", "Neither agree nor disagree", 
              "Agree", "Strongly agree")
)

Knob Input

A jQuery based knob, similar to sliderInput or sliderTextInput:
knobInput

knobInput(
  inputId = "myKnob",
  label = "jQuery knob example:",
  value = 0,
  min = -100,
  displayPrevious = TRUE, 
  lineCap = "round",
  fgColor = "#428BCA",
  inputColor = "#428BCA"
)

Select picker

Dropdown menu with a lot of options :
pickerInput

pickerInput(
  inputId = "myPicker", 
  label = "Select/deselect all + format selected", 
  choices = LETTERS, 
  options = list(
    `actions-box` = TRUE, 
    size = 10,
    `selected-text-format` = "count > 3"
  ), 
  multiple = TRUE
)

Checkbox and radio buttons

Turn buttons into checkbox or radio :
checkboxGroupButtons

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"))
)

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

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

Hide input in a button :
dropdown_off dropdown_on

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 !

Functions in shinyWidgets

Name Description
addSpinner Display a spinner above an output when this one recalculate
actionBttn Awesome action button
prettyToggle Pretty Toggle Input
actionGroupButtons Actions Buttons Group Inputs
toggleDropdownButton Toggle a dropdown menu
demoAirDatepicker Some examples on how to use airDatepickerInput
confirmSweetAlert Launch a confirmation dialog
useBs4Dash Use 'bs4Dash' in 'shiny'
downloadBttn Create a download actionBttn
animateOptions Animate options
awesomeCheckbox Awesome Checkbox Input Control
animations Animation names
awesomeRadio Awesome Radio Buttons Input Control
spectrumInput Palette Color Picker with Spectrum Library
prettySwitch Pretty Switch Input
appendVerticalTab Mutate Vertical Tabset Panel
demoNoUiSlider Some examples on how to use noUiSliderInput
progressSweetAlert Progress bar in a sweet alert
awesomeCheckboxGroup Awesome Checkbox Group Input Control
colorSelectorInput Color Selector Input
demoNumericRange An example showing how numericRangeInput works
updateAwesomeRadio Change the value of a radio input on the client
checkboxGroupButtons Buttons Group checkbox Input Control
circleButton Circle Action button
airDatepicker Air Date Picker Input
noUiSliderInput Numeric range slider
materialSwitch Material Design Switch Input Control
setBackgroundColor Custom background color for your shinyapp
sliderTextInput Slider Text Input Widget
closeSweetAlert Close Sweet Alert
multiInput Create a multiselect input control
prettyRadioButtons Pretty radio Buttons Input Control
sendSweetAlert Display a Sweet Alert to the user
textInputAddon Text with Add-on Input Control
updateSpectrumInput Change the value of a spectrum input on the client
setSliderColor Color editor for sliderInput
progress-bar Progress Bars
updateVerticalTabsetPanel Update selected vertical tab
shinyWidgets shinyWidgets: Custom inputs widgets for Shiny.
numericRangeInput Numeric Range Input
searchInput Search Input
updateKnobInput Change the value of a knob input on the client
tooltipOptions Tooltip options
updateSwitchInput Change the value of a switch input on the client
selectizeGroup-module Selectize Group
inputSweetAlert Launch an input text dialog
updateMaterialSwitch Change the value of a materialSwitch input on the client
updateAirDateInput Change the value of airDatepickerInput on the client
updateNumericRangeInput Change the value of a numeric range input
useShinydashboardPlus Use 'shinydashboardPlus' in 'shiny'
useArgonDash Use 'argonDash' in 'shiny'
updateCheckboxGroupButtons Change the value of a checkboxes group buttons input on the client
updatePrettyRadioButtons Change the value pretty radio buttons on the client
updatePickerInput Change the value of a select picker input on the client
useSweetAlert Load Sweet Alert dependencies
useShinydashboard Use 'shinydashboard' in 'shiny'
radioGroupButtons Buttons Group Radio Input Control
pickerGroup-module Picker Group
wNumbFormat Format numbers in noUiSliderInput
dropdown Dropdown
dropdownButton Dropdown Button
pickerInput Select picker Input Control
pickerOptions Options for `pickerInput`
setBackgroundImage Custom background image for your shinyapp
knobInput Knob Input
chooseSliderSkin Theme selector for sliderInput
setShadow Custom shadows
updateAwesomeCheckbox Change the value of an awesome checkbox input on the client
updatePrettyCheckbox Change the value of a pretty checkbox on the client
updateAwesomeCheckboxGroup Change the value of a awesomeCheckboxGroup input on the client
updatePrettyToggle Change the value of a pretty toggle on the client
updatePrettyCheckboxGroup Change the value of a pretty checkbox on the client
panel Create a panel
updateSearchInput Change the value of a search input on the client
prettyCheckboxGroup Pretty Checkbox Group Input Control
prettyCheckbox Pretty Checkbox Input
updateSliderTextInput Change the value of a slider text input on the client
vertical-tab Vertical tab panel
shinyWidgetsGallery Launch the shinyWidget Gallery
switchInput Bootstrap Switch Input Control
updatePrettySwitch Change the value of a pretty switch on the client
updateRadioGroupButtons Change the value of a radio group buttons input on the client
updateMultiInput Change the value of a multi input on the client
updateNoUiSliderInput Change the value of a no ui slider input on the client
No Results!

Last month downloads

Details

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/shinyWidgets)](http://www.rdocumentation.org/packages/shinyWidgets)