# Range Slider

Source: https://www.potatoannotator.com/docs/annotation-types/range-slider

The range slider annotation schema provides a dual-thumb slider that lets annotators select a range of values rather than a single point. This is useful for tasks where the answer is a span or interval, such as estimating age ranges, time windows, or confidence intervals.

## Overview

Unlike a standard slider that captures a single value, the range slider has two draggable thumbs representing the low and high ends of a range. Annotators drag either thumb to define the interval. The current values are displayed alongside the slider for precision.

## Quick Start

```yaml
annotation_schemes:
  - annotation_type: range_slider
    name: age_range
    description: Estimate the age range of the author.
    min_value: 0
    max_value: 100
    step: 1
    left_label: "Young"
    right_label: "Old"
```

## Configuration Options

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `annotation_type` | string | Required | Must be `"range_slider"` |
| `name` | string | Required | Unique identifier for this schema |
| `description` | string | Required | Instructions displayed to annotators |
| `min_value` | number | `0` | Minimum value of the slider scale |
| `max_value` | number | `100` | Maximum value of the slider scale |
| `step` | number | `1` | Increment between selectable values |
| `left_label` | string | — | Label displayed at the left (minimum) end of the slider |
| `right_label` | string | — | Label displayed at the right (maximum) end of the slider |
| `show_values` | boolean | `true` | Display the currently selected low and high values |
| `default_low` | number | — | Default position of the low thumb |
| `default_high` | number | — | Default position of the high thumb |
| `label_requirement.required` | boolean | `false` | Whether the annotation must be completed before moving on |

## Examples

### Age Range Estimation

```yaml
annotation_schemes:
  - annotation_type: range_slider
    name: age_estimate
    description: What age range do you think the author falls in?
    min_value: 13
    max_value: 90
    step: 1
    left_label: "Younger"
    right_label: "Older"
    default_low: 25
    default_high: 45
```

### Confidence Interval

```yaml
annotation_schemes:
  - annotation_type: range_slider
    name: confidence_interval
    description: Select the range within which you believe the true value falls.
    min_value: 0
    max_value: 100
    step: 5
    left_label: "0%"
    right_label: "100%"
    show_values: true
    label_requirement:
      required: true
```

### Time Window

```yaml
annotation_schemes:
  - annotation_type: range_slider
    name: time_window
    description: When during the day is this activity most likely? (hours)
    min_value: 0
    max_value: 24
    step: 0.5
    left_label: "Midnight"
    right_label: "Midnight"
    default_low: 9
    default_high: 17
```

### Temperature Comfort Range

```yaml
annotation_schemes:
  - annotation_type: range_slider
    name: comfort_range
    description: What temperature range (°F) do you find comfortable?
    min_value: 40
    max_value: 110
    step: 1
    left_label: "Cold"
    right_label: "Hot"
    show_values: true
```

## Output Format

```json
{
  "age_estimate": {
    "labels": {
      "low": 28,
      "high": 42
    }
  }
}
```

The output always contains `low` and `high` values within the configured `min_value` to `max_value` range.

## Best Practices

1. **Set meaningful defaults** - use `default_low` and `default_high` to avoid anchoring all annotators to the extremes
2. **Choose an appropriate step size** - fine-grained steps (0.1) for precise tasks, coarse steps (5, 10) for rough estimates
3. **Add endpoint labels** - `left_label` and `right_label` provide semantic context beyond raw numbers
4. **Keep show_values enabled** - numeric readouts help annotators make precise selections
5. **Use for genuine range tasks** - if only a single value is needed, use the standard [Slider](/docs/annotation-types/slider) instead

## Further Reading

- [Slider](/docs/annotation-types/slider) - Single-value continuous annotation
- [Likert Scales](/docs/annotation-types/likert-scales) - Ordinal rating scales
- [Soft Label](/docs/annotation-types/soft-label) - Probability distribution allocation

For implementation details, see the [source documentation](https://github.com/davidjurgens/potato/blob/main/docs/annotation_schemes.md).
