Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Slider

A labelled numeric slider whose value drives other widgets.

Import

from manywidgets import Slider

Example

from manywidgets import Slider

Slider(label="Amplitude", min=0, max=10, step=0.5, value=3)

API

TraitTypeDefaultDescription
valueFloat0.0Current value.
minFloat0.0Minimum value.
maxFloat100.0Maximum value.
stepFloat1.0Step size.
labelUnicode''Label shown above the slider.
widget_idUnicode''Stable unique id used for cross-widget linking (auto-assigned).

Linking

Link like any widget (see the linking guide):

from ipywidgets import jsdlink
from manywidgets import Chart, Slider

slider = Slider(label="Height", min=200, max=600, value=320)
chart = Chart(title="Linked")
jsdlink((slider, "value"), (chart, "height"))