🧩 Custom Gradio components by Argmax, Inc.
- RangeSlider: Double-thumb slider component for precise interval selection within a certain range.
pip install argmax_gradio_components
import gradio as gr
from argmax_gradio_components import RangeSlider
with gr.Blocks() as demo:
range_slider = RangeSlider(minimum=0, maximum=100, label="Select Range")
output = gr.Markdown("Selected range: {0} to {1}")
range_slider.change(
lambda x: f"Selected range: {x[0]} to {x[1]}",
inputs=range_slider,
outputs=output
)
demo.launch()
name | type | default | description |
---|---|---|---|
minimum |
float |
0 |
Minimum value for slider. |
maximum |
float |
100 |
Maximum value for slider. |
value |
tuple[float, float] | Callable | None |
None |
Default value. If callable, the function will be called whenever the app loads to set the initial value of the component. |
step |
float | None |
None |
Increment between slider values. |
label |
str | None |
None |
The label for this component. Appears above the component and is also used as the header if there are a table of examples for this component. |
visible |
bool |
True |
If False, component will be hidden. |
name | description |
---|---|
change |
Triggered when the value of the RangeSlider changes either because of user input OR because of a function update. |
input |
This listener is triggered when the user changes the value of the RangeSlider. |
release |
This listener is triggered when the user releases the mouse on this RangeSlider. |