({{, (RefLink[IntervalSlider, paclet:ref/IntervalSlider])[{xmin,xmax}] 
represents a slider with setting {xmin,xmax} in the range 0 to 1.}, {, (RefLink[IntervalSlider, paclet:ref/IntervalSlider])[(RefLink[Dynamic, paclet:ref/Dynamic])[int]]
takes the setting to be the dynamically updated current value of int, with the value of int being reset if the slider is moved.}, {, (RefLink[IntervalSlider, paclet:ref/IntervalSlider])[int,{min,max}]
represents a slider with range min to max.}, {, (RefLink[IntervalSlider, paclet:ref/IntervalSlider])[int,{min,max,dx}]
represents a slider that jumps in steps dx.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[IntervalSlider, paclet:ref/IntervalSlider])[…] displays in a notebook as a horizontal slider with three slider thumbs that can be manipulated interactively.

(RefLink[IntervalSlider, paclet:ref/IntervalSlider])[(RefLink[Dynamic, paclet:ref/Dynamic])[int]] will reset the value of int when the slider is moved; (RefLink[IntervalSlider, paclet:ref/IntervalSlider])[int] will not.

(RefLink[IntervalSlider, paclet:ref/IntervalSlider])[int,{min,max,dx}] jumps to integer positions if min and dx are integers.

The following options can be given:

Possible settings for (RefLink[Appearance, paclet:ref/Appearance]) include (RefLink[Automatic, paclet:ref/Automatic]), "Markers", "Generic", "Locator", and (RefLink[None, paclet:ref/None]).

If the (RefLink[Appearance, paclet:ref/Appearance]) setting includes "Vertical", a vertical slider will be displayed.

(RefLink[Appearance, paclet:ref/Appearance]) -> "Labeled" displays the current value of the slider as an editable label.

If the (RefLink[Appearance, paclet:ref/Appearance]) setting includes "ThumbAppearance"->{(Subscript[expr, 1]),(Subscript[expr, 2]),(Subscript[expr, 3])}, the three interactive points on the slider will use the given expressions for their display. Nothing will be displayed for the interactive point if (RefLink[None, paclet:ref/None]) is specified.

Possible settings for (RefLink[Method, paclet:ref/Method]) include "Free", "Push", and "Stop".

(RefLink[IntervalSlider, paclet:ref/IntervalSlider])[] is equivalent to (RefLink[IntervalSlider, paclet:ref/IntervalSlider])[{0.25, 0.75}].

The resulting slider can be finely manipulated by holding down the (Key0[alt]) key (or (Key0[opt]) on Macintosh) while dragging the mouse. This causes the slider to move at 1/20 the rate of the mouse. The slider can be even more finely manipulated by also holding the (Key0[shift]) and/or (Key0[ctrl]) keys.

OpenersPrimaryExamplesSection(Spacer1)Examples  (21)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

An interval from 0.2 to 0.5 in the default range 0 to 1:

IntervalSlider[{0.2,0.5}]

A slider with its value updated dynamically:

{IntervalSlider[Dynamic[int]],Dynamic[int]}

OpenersExampleSection1(Spacer1)Scope  (4)

Use the range -10 to 10:

{IntervalSlider[Dynamic[int],{-10,10}],Dynamic[int]}

Use only integer variable values:

{IntervalSlider[Dynamic[int],{-10,10,1}],Dynamic[int]}

Use rational steps:

{IntervalSlider[Dynamic[int],{-10,10,1/5}],Dynamic[int]}

Use slider increments of π:

{IntervalSlider[Dynamic[r],{0,10Pi,Pi}],Dynamic[r]}

Use a custom function when assigning new values:

{IntervalSlider[Dynamic[int,(int=#;m=Mean[#])&],{-10,10,1}],Dynamic[{int,m}]}

OpenersExampleSection2(Spacer1)Options  (11)

OpenersExampleSubsection0(Spacer1)Appearance  (5)

Special arrow appearances:

IntervalSlider[Appearance->"Generic"]

IntervalSlider[Appearance->"Markers"]

IntervalSlider[Appearance -> "Paired"]

Show no special slider thumbs:

IntervalSlider[Appearance->None]

Show the current interval values in an editable label:

IntervalSlider[Appearance -> "Labeled"]

Display a vertical slider:

IntervalSlider[Appearance->"Vertical"]

(RefLink[Appearance, paclet:ref/Appearance]) can be set to a list:

IntervalSlider[Appearance->{"Vertical","Markers"}]

Use any expression as slider thumbs:

IntervalSlider[Appearance -> {"ThumbAppearance" -> {Style["[",18],None,Style["]",18]}}]

OpenersExampleSubsection1(Spacer1)Enabled  (2)

By default, (RefLink[IntervalSlider, paclet:ref/IntervalSlider]) is enabled:

IntervalSlider[]

By setting (RefLink[Enabled, paclet:ref/Enabled])->(RefLink[False, paclet:ref/False]), the slider is disabled but visible in its current state:

IntervalSlider[Enabled->False]

OpenersExampleSubsection2(Spacer1)Method  (3)

When trying to drag one endpoint past the other, the default method will not stop you:

IntervalSlider[]

The "Push" method causes the dragging of one endpoint to push the other out of the way:

IntervalSlider[Method->"Push"]

With the "Stop" method, you cannot drag one endpoint past the other:

IntervalSlider[Method->"Stop"]

OpenersExampleSubsection3(Spacer1)MinIntervalSize  (1)

If the two thumbs must have different values, set (RefLink[MinIntervalSize, paclet:ref/MinIntervalSize]) to a positive number:

IntervalSlider[{3,7},{0,10,1},MinIntervalSize->1,Appearance -> "Labeled"]

OpenersExampleSection3(Spacer1)Applications  (1)

Get a detailed view of a financial dataset:

DynamicModule[{data,xmin,xmax,ymin,ymax,int,w=400,h=30},
data=FinancialData["IBM","Jan. 1, 2004"];
ymin=Min[Last/@data];ymax=Max[Last/@data];{xmin,xmax}=FromDate/@data[[{1,-1},1]];
Column[{
Show[DateListPlot[data,ImageSize -> w,Joined -> True],PlotRange->{Dynamic[int],{ymin,ymax}}],
IntervalSlider[Dynamic[int],{xmin,xmax,1},ImageSize -> {400,30},MinIntervalSize -> 1],
DateListPlot[data,Frame ->False,Axes -> False,ImageSize -> {w,h},AspectRatio->h/w,Joined->True,Epilog->{Opacity[0.5],Orange,Dynamic[Rectangle @@ Thread[{int,{ymin,ymax}}]]}]}]]

OpenersExampleSection4(Spacer1)Properties & Relations  (1)

(RefLink[ControlType, paclet:ref/ControlType])->IntervalSlider will create an (RefLink[IntervalSlider, paclet:ref/IntervalSlider]) in (RefLink[Manipulate, paclet:ref/Manipulate]):

Manipulate[int,{{int,{0.3,0.7}},0,1,ControlType -> IntervalSlider,Method -> "Push",MinIntervalSize->0.1}]

OpenersExampleSection5(Spacer1)Possible Issues  (1)

By default, (RefLink[IntervalSlider, paclet:ref/IntervalSlider]) does not force the first element to remain less than the second:

{IntervalSlider[Dynamic[x],{0,100,1}],Dynamic[x]}

To prevent dragging the minimum greater than the maximum, use (RefLink[Method, paclet:ref/Method]) -> "Push" or "Stop":

{IntervalSlider[Dynamic[y],{0,100,1},Method -> "Push"],Dynamic[y]}

Add a (RefLink[MinIntervalSize, paclet:ref/MinIntervalSize]) setting if the minimum should be strictly less than the maximum:

{IntervalSlider[Dynamic[z],{0,100,1},Method -> "Push",MinIntervalSize->3],Dynamic[z]}

OpenersExampleSection6(Spacer1)Neat Examples  (1)

Show the value of the endpoints directly on the slider thumbs:

IntervalSlider[Dynamic[int],{0,100,1},Appearance -> {"ThumbAppearance" -> {Dynamic[Framed[First[int],Background->LightPurple]],None,Dynamic[Framed[Last[int],Background->LightPurple]]}}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Slider, paclet:ref/Slider])  ▪  (RefLink[Interval, paclet:ref/Interval])  ▪  (RefLink[HorizontalGauge, paclet:ref/HorizontalGauge])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Introduction to Dynamic, paclet:tutorial/IntroductionToDynamic])}, {▪(RefLinkPlain[Introduction to Control Objects, paclet:tutorial/IntroductionToControlObjects])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Control Objects, paclet:guide/ControlObjects])}})}})