Skip to contents

Create a Slider component

Usage

calcite_slider(...)

Arguments

...

named attributes passed to htmltools::tag()

Value

an object of class calcite_component which is a subclass of shiny.tag

Details

Properties

The following properties are provided by this component:

NameAttributeDescriptionValuesReflects to Attribute
disableddisabledWhen true, interaction is prevented and the component is displayed with lower opacity.booleanTRUE
fillPlacementfill-placementUsed to configure where the fill is placed along the slider track in relation to the value handle. Range mode will always display the fill between the min and max handles."end" | "none" | "start"TRUE
formformThe id of the form that will be associated with the component. When not set, the component will be associated with its ancestor form element, if any.stringTRUE
groupSeparatorgroup-separatorWhen true, number values are displayed with a group separator corresponding to the language and country format.booleanTRUE
hasHistogramhas-histogramWhen true, indicates a histogram is present.booleanTRUE
histogramNAA list of the histogram's x,y coordinates within the component's min and max. Displays above the component's track.Check API referenceFALSE
histogramStopsNAA set of single color stops for a histogram, sorted by offset ascending.Check API referenceFALSE
labelFormatterNAWhen specified, allows users to customize handle labels.(value: number, type: "min" | "value" | "max" | "tick", defaultFormatter: (value: number) => string) => stringFALSE
labelHandleslabel-handlesWhen true, displays label handles with their numeric value.booleanTRUE
labelTickslabel-ticksWhen true and ticks is specified, displays label tick marks with their numeric value.booleanTRUE
maxmaxThe component's maximum selectable value.numberTRUE
maxLabelmax-labelFor multiple selections, the accessible name for the second handle, such as "Temperature, upper bound".stringFALSE
maxValuemax-valueFor multiple selections, the component's upper value.numberFALSE
minminThe component's minimum selectable value.numberTRUE
minLabelmin-labelAccessible name for first (or only) handle, such as "Temperature, lower bound".stringFALSE
minValuemin-valueFor multiple selections, the component's lower value.numberFALSE
mirroredmirroredWhen true, the slider will display values from high to low. Note that this value will be ignored if the slider has an associated histogram.booleanTRUE
namenameSpecifies the name of the component. Required to pass the component's value on form submission.stringTRUE
numberingSystemnumbering-systemSpecifies the Unicode numeral system used by the component for localization."arab" | "arabext" | "latn"FALSE
pageSteppage-stepSpecifies the interval to move with the page up, or page down keys.numberTRUE
precisepreciseWhen true, sets a finer point for handles.booleanTRUE
requiredrequiredWhen true and the component resides in a form, the component must have a value in order for the form to submit.booleanTRUE
scalescaleSpecifies the size of the component."l" | "m" | "s"TRUE
snapsnapWhen true, enables snap selection in coordination with step via a mouse.booleanTRUE
statusstatusSpecifies the status of the input field, which determines message and icons."idle" | "invalid" | "valid"TRUE
stepstepSpecifies the interval to move with the up, or down keys.numberTRUE
ticksticksDisplays tick marks on the number line at a specified interval.numberTRUE
validationIconvalidation-iconSpecifies the validation icon to display under the component.boolean | stringTRUE
validationMessagevalidation-messageSpecifies the validation message to display under the component.stringFALSE
validityNAThe current validation state of the component.Check API referenceFALSE
valuevalueThe component's value.Check API referenceTRUE

Events

The following events are observed by shiny:

EventDescription
calciteSliderChangeFires when the thumb is released on the component. Note: To constantly listen to the drag event, use calciteSliderInput instead.
calciteSliderInputFires on all updates to the component. Note: Fires frequently during drag. To perform expensive operations consider using a debounce or throttle to avoid locking up the main thread.

Examples

calcite_slider()
#> <calcite-slider></calcite-slider>