App.slider
- App.slider(title, value=0, minval=0, maxval=100, step=1, annotation='', bgcolor=None, parent=None)[source]
Decorator for slider actions.
- Parameters
- titlestr
The text label of the slider.
- valueint, optional
Initial value of the slider.
- minvalint, optional
Minimum value of the sliding range.
- maxvalint, optional
Maximum value of the sliding range.
- stepint, optional
Size of the sliding step.
- annotationstr, optional
Value annotation.
- Returns
- callable
Notes
Use this method to convert a function into the callback action of a slider, and automatically add the slider to the sidebar.
Examples
@viewer.slider(title='Slide me!') def slide(app): app.info('Thanks for sliding...')