if min or max are NA
then the slider widget will be hidden
Source: R/optionalInput.R
optionalSliderInput.Rd
Hidden input widgets are useful to have the input[[inputId]]
variable
on available in the server function but no corresponding visual clutter from
input widgets that provide only a single choice.
Arguments
- inputId
The
input
slot that will be used to access the value.- label
Display label for the control, or
NULL
for no label.- min, max
The minimum and maximum values (inclusive) that can be selected.
- value
The initial value of the slider, either a number, a date (class Date), or a date-time (class POSIXt). A length one vector will create a regular slider; a length two vector will create a double-ended range slider. Must lie between
min
andmax
.- label_help
(
shiny.tag
) optional
object of classshiny.tag
, e.g. an object returned byshiny::helpText()
- ...
optional arguments to
sliderInput
Examples
optionalSliderInput("a", "b", 0, 1, 0.2)
#> <div class="form-group shiny-input-container">
#> <label class="control-label" id="a-label" for="a">b</label>
#> <input class="js-range-slider" id="a" data-skin="shiny" data-min="0" data-max="1" data-from="0.2" data-step="0.01" data-grid="true" data-grid-num="10" data-grid-snap="false" data-prettify-separator="," data-prettify-enabled="true" data-keyboard="true" data-data-type="number"/>
#> </div>