A slider provides a visual indication of adjustable content, as well as the current setting in the total range of content. Use a slider when you want people to set defined values (such as volume or brightness), or when people would benefit from instant feedback on the effect of setting changes.
For more details and examples visit the official docs. The R package can not handle each and every case, so for advanced use cases you need to work using the original docs to achieve the desired result.
Slider(...) Slider.shinyInput(inputId, ..., value = defaultValue) updateSlider.shinyInput( session = shiny::getDefaultReactiveDomain(), inputId, ... )
The initial value of the Slider. Use this if you intend to pass in a new value as a result of onChange events. This value is mutually exclusive to defaultValue. Use one or the other.
A description of the Slider for the benefit of screen readers.
(value: number) => string
A text description of the Slider number value for the benefit of screen readers. This should be used when the Slider number value is not accurately represented by a number.
Optional mixin for additional props on the thumb button within the slider.
Optional className to attach to the slider root element.
Optional callback to access the ISlider interface. Use this instead of ref for accessing the public methods and properties of the component.
The initial value of the Slider. Use this if you intend for the Slider to be an uncontrolled component. This value is mutually exclusive to value. Use one or the other.
Optional flag to render the Slider as disabled.
Description label of the Slider
The max value of the Slider
The min value of the Slider
(value: number) => void
Callback when the value has been changed
(event: MouseEvent | TouchEvent | KeyboardEvent, value: number) => void
Callback on mouse up or touch end
Optional flag to attach the origin of slider to zero. Helpful when the range include negatives.
Whether to show the value on the right of the Slider.
Optional flag to decide that thumb will snap to closest value while moving the slider
The difference between the two adjacent values of the Slider
Call to provide customized styling that will layer on top of the variant rules.
Theme provided by High-Order Component.
(value: number) => string
Optional function to format the slider value.
Optional flag to render the slider vertically. Defaults to rendering horizontal.
Don't use a slider for binary settings.
Don't use a continuous slider if the range of values is large.
Don't use for a range with fewer than three values.
Sliders are typically horizontal but can be vertical, when needed.