SliderBox[x]
is a low-level box construct that represents a slider with setting x in the range 0 to 1.
takes the setting to be the dynamically updated current value of x, with the value of x being reset if the slider is moved.
SliderBox[x,{xmin,xmax}]
represents a slider with range xmin to xmax.
SliderBox[x,{xmin,xmax,dx}]
represents a slider that jumps in steps dx.
SliderBox[x,{{e1,e2,…}}]
represents a slider in which equally spaced intervals correspond to successive settings ei.
SliderBox[x,{{{e1,w1},{e2,w2},…}}]
uses intervals of relative widths wi for the ei.
SliderBox
SliderBox[x]
is a low-level box construct that represents a slider with setting x in the range 0 to 1.
takes the setting to be the dynamically updated current value of x, with the value of x being reset if the slider is moved.
SliderBox[x,{xmin,xmax}]
represents a slider with range xmin to xmax.
SliderBox[x,{xmin,xmax,dx}]
represents a slider that jumps in steps dx.
SliderBox[x,{{e1,e2,…}}]
represents a slider in which equally spaced intervals correspond to successive settings ei.
SliderBox[x,{{{e1,w1},{e2,w2},…}}]
uses intervals of relative widths wi for the ei.
Details and Options
- SliderBox is generated as the low-level representation of Slider. Except for low-level notebook expression manipulation, SliderBox should not need to be used directly.
- The following options can be given:
-
Appearance {Automatic,Automatic,"Normal",Automatic} appearance of the slider AutoAction False whether to change the slider automatically when the mouse is over it Background Automatic background color BaselinePosition Automatic what to align with a surrounding text baseline BaseStyle {} base style specifications ContinuousAction True whether to update continuously when the slider is moved Enabled Automatic whether the slider is enabled or grayed out Exclusions {} specific values to be excluded ImageMargins Automatic margins around the image of the displayed slider ImageSize Automatic the overall image size of the displayed slider - xmin, xmax and dx must be machine-sized integers or reals. »
Examples
open all close allBasic Examples (3)
A slider with setting 0.8 in the range 0 to 1:
RawBoxes[SliderBox[0.8]]A slider with its value updated dynamically:
{RawBoxes[SliderBox[Dynamic[x]]], Dynamic[x]}A slider with integer values in the range
to
:
{RawBoxes[SliderBox[Dynamic[n], {0, 100, 1}]], Dynamic[n]}Scope (4)
Use the range
to
, increasing when going from left to right:
x = 0;{RawBoxes[SliderBox[Dynamic[x], {-1, 1}]], Dynamic[x]}A slider with range
to
, increasing when going from right to left:
y = 0;{RawBoxes[SliderBox[Dynamic[y], {1, -1}]], Dynamic[y]}Use only integer variable values:
{RawBoxes[SliderBox[Dynamic[n], {0, 100, 1}]], Dynamic[n]}Use a list of possible values:
{RawBoxes[SliderBox[Dynamic[x], {{a, 2, True}}]], Dynamic[x]}Change the relative width corresponding to each possible value:
{RawBoxes[SliderBox[Dynamic[x], {{{a, 10}, {2, 5}, {True, 20}}}]], Dynamic[x]}Properties & Relations (3)
SliderBox is used in the typesetting of Slider expressions:
ToBoxes[Slider[.5]]SliderBox with a custom Appearance option is used in the typesetting of VerticalSlider:
ToBoxes[VerticalSlider[.5]]Although SliderBox is limited to machine numbers, Slider can do more:
{Slider[Dynamic[x], {10 ^ 25, 10 ^ 25 + 5, 1}], Dynamic[x, Initialization :> (x = 10 ^ 25)]}Slider does this by mapping the range into one that SliderBox can interpret:
ToBoxes[Slider[Dynamic[x], {10 ^ 25, 10 ^ 25 + 5, 1}]]//InputFormSlider also maps continuous ranges of symbolic values:
ToBoxes[Slider[Dynamic[y], {a, 5a, a}]]//InputFormSee Also
Text
Wolfram Research (2007), SliderBox, Wolfram Language function, https://reference.wolfram.com/language/ref/SliderBox.html (updated 2008).
CMS
Wolfram Language. 2007. "SliderBox." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2008. https://reference.wolfram.com/language/ref/SliderBox.html.
APA
Wolfram Language. (2007). SliderBox. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SliderBox.html
BibTeX
@misc{reference.wolfram_2026_sliderbox, author="Wolfram Research", title="{SliderBox}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/SliderBox.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_sliderbox, organization={Wolfram Research}, title={SliderBox}, year={2008}, url={https://reference.wolfram.com/language/ref/SliderBox.html}, note=[Accessed: 12-June-2026]}