Collection of custom input controls and user interface components for 'Shiny' applications. Give your applications a unique and colorful style !
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 CRANinstall.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
Turn checkboxes into toggle switches :
switchInput(inputId = "id", value = TRUE)
Turn checkboxes into toggle switches (again) :
materialSwitch(inputId = "id", label = "Primary switch", status = "danger")
Checkbox and radio buttons with the beautiful CSS library pretty-checkbox :
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"), ...
Displays a message to the user :
See examples in ?sendSweetAlert
.
Request confirmation from the user :
See examples in ?confirmSweetAlert
.
Slider with strings, to pass whatever you want :
sliderTextInput( inputId = "mySliderText", label = "Your choice:", grid = TRUE, force_edges = TRUE, choices = c("Strongly disagree", "Disagree", "Neither agree nor disagree", "Agree", "Strongly agree"))
A jQuery based knob, similar to sliderInput or sliderTextInput:
knobInput( inputId = "myKnob", label = "jQuery knob example:", value = 0, min = -100, displayPrevious = TRUE, lineCap = "round", fgColor = "#428BCA", inputColor = "#428BCA")
Dropdown menu with a lot of options :
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)
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")))
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%")
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 !
useArgonDash
to inport functions from argonDash.useBs4Dash
to import functions from bs4Dash.searchInput
label & placeholder in modules.useShinydashboard
.prettyRadio
& prettyCheckbox
with icons.awesome*
widgets due to FontAwesome upgrade in Shiny @AshesITR.appendVerticalTab
, removeVerticalTab
, reorderVerticalTabs
) by @ifellowsnumericRangeInput
by @wkdavis.updateMultiInput
for updating multiInput
, thanks to @ifellows.updateVerticalTabsetPanel
for updating verticalTabsetPanel
.knobInput
and airDatepickerInput
.unit_mark
& range_value
in progressBar
).update_on
to choose when trigger update server-side in spectrumInput
.selectizeGroup
.pickerOptions
to help using pickerInput
options argument.actionGroupButtons
.dropdown
button act like an actionButton
(same behavior as dropdownButton
)pickerInput
).sliderInput
: chooseSliderSkin
and setSliderColor
by @DivadNojnarg.downloadBttn
, a downloadButton
with custom appearance.airDatepickerInput
, to select single, multiple and range of dates. You can also select time. And two shortcuts to select months or years.useShinydashboard
to use functions from 'shinydashboard' into a classic 'shiny' app, specifically valueBox
, infoBox
and box
.setBackgroundColor
and setBackgroundImage
to change background color or use an image, by @DivadNojnarg.updateSearchInput
to update searchInput
server-side #52.inline
to prettySwitch
, prettyToggle
and prettyCheckbox
to position checkboxes side by side.html
to confirmSweetAlert
and sendSweetAlert
to pass HTML tags in alert window #48.selectizeGroup
and pickerGroup
.noUiSlider
, a minimal slider range for numeric values.confirmSweetAlert
(confirmation dialog box), inputSweetAlert
(text input dialog box), progressSweetAlert
(progress bar in popup).sendSweetAlert
works without using useSweetAlert
in UI.toggleDropdownButton
.Bug fixes :
pretty*
and bttn
.spectrumInput
for choosing colors in palettes or custom one.prettyCheckbox
, prettySwitch
, prettyToggle
, prettyCheckboxGroup
and prettyRadioButtons
for create pretty checkboxes,
toggle switch, radio buttons with colors, icons and a lot of options.knobInput
a round slider, thanks to @DivadNojnarg.Bug fixes:
renderUI
) pickerInput
and switchInput
.awesomeCheckboxGroup
not working when inline = FALSE
, thanks to @meganhartwell-stemcell, @dStudio-git, @Nicolabo to report this.dropdown
reported by @markdumke.sliderTextInput
: a slider for character vector.choiceNames
& choiceValues
for checkboxGroupButtons
& radioGroupButtons
to easily pass HTML in the names displayed on the buttons.inline
to materialSwitch
, thanks to @FrissAnalytics.bsplus
.pickerInput
to bootstrap-select 1.12.4.switchInput
to bootstrap-switch 3.3.4.receiveSweetAlert
for simpler use with useSweetAlert
.materialSwitch
(#17).This release fix a bug in the gallery and add tests.
checkboxGroupButtons
when individual = TRUE
, causing shinyWidgetsGallery
on launch.Several updates methods implemented.
updateAwesomeCheckbox
for updating single awesome checkbox.panel
to create similar panel than in shinydashboard.updateSwitchInput
, updateRadioGroupButtons
, updateCheckboxGroupButtons
, updateAwesomeRadio
, updateAwesomeCheckboxGroup
searchInput
are now actionButton
, see #11Better documentation and examples. Alternative function to create a dropdown. New function colorSelector
.