Example Usage

import zero_true as zt

# Create a RangeSlider component
range_slider = zt.RangeSlider(
  id="sample_range_slider",
  color="primary",        # Color of the range slider
  label="Select Range",   # A label for your slider
  max=100,                # Maximum value of the slider
  min=0,                  # Minimum value of the slider
  rounded=True,           # Determines if the slider has rounded edges
  size="large",           # Size of the slider
  step=1,                 # Step increment of the slider
  thumb_label="always",   # Displays the thumb label
  thumb_size=20,          # Size of the thumb
  tick_labels=True,       # Displays the tick labels
  ticks=[0, 20, 40, 60, 80, 100],  # Displays the ticks
  triggerEvent="end",     # Trigger event for when to trigger a run
  value=[0, 100]          # Current value range of the slider
)

# Assuming you have a mechanism to render or use this RangeSlider within a layout
layout = zt.Layout(components=[range_slider])

Example Output

Overview

pydantic model zero_true.RangeSlider

The RangeSlider component allows users to select a range of values within a defined interval, making it an ideal choice for input forms where users need to specify a range, such as price or time boundaries.

This component enhances user interaction by providing features like custom color options, step increments, and optional rounded edges. Its flexible design supports both numerical ranges and the addition of visual elements such as tick marks and labels to aid in usability.

JSON Schema

Bellow are the various attributes you can assign to the component. Utlizing them can allow for modifications to the pre-created object.
zero_true.RangeSlider
Zero True Component

Methods

classmethod get_value_from_global_state(value, values)