# <range-slider>

A slider with two thumbs that picks a range; name="price" publishes price_min and price_max.

Category: Forms and input.

```ham
<column style="w-full gap-8">
    <range-slider name="price"
                  min="0"
                  max="500"
                  start="80"
                  end="240"
                  divisions="50"
                  color="teal-600"
                  label="Price"/>
    <text @text="'$' + $price_min + ' to $' + $price_max"
          style="muted"></text>
</column>
```

How Hype Apps draws it on a phone: [light](https://hypeapps.dev/img/tags/range-slider-light.webp), [dark](https://hypeapps.dev/img/tags/range-slider-dark.webp).

## Attributes

| Name | What it does | Default |
|---|---|---|
| `color` | Active color |  |
| `divisions` | Number of discrete steps |  |
| `end` | End value | `max` |
| `label` | Label text |  |
| `max` | Range maximum | `100` |
| `min` | Range minimum | `0` |
| `name` | Two variables, name_min and name_max (numbers on the slider's steps), sent as two fields; a change carries $event.min / $event.max. |  |
| `start` | Start value | `min` |

## Readings

| Name | What it does |
|---|---|
| `divisions` | The divisions= in force; empty when the slider is continuous. |
| `dragging` | Whether a thumb is being dragged. |
| `end` | The upper thumb, live as it moves. |
| `max` | The max= in force. |
| `min` | The min= in force, as the control resolves it. |
| `start` | The lower thumb, live as it moves. |
| `value` | Both thumbs as the form sends them: "start-end". |

Any tag also takes gestures: `@on.tap`, `@on.longpress`, `@on.doubletap` and `@on.swipeleft` (and right, up and down). `@click` runs on a tap too.

## Related tags

- [`<column>`](https://hypeapps.dev/docs/reference/column.md): Stacks its children top to bottom, with a gap between them and an alignment across.
- [`<text>`](https://hypeapps.dev/docs/reference/text.md): A run of text; with @text it shows an expression that updates as its variables change.
- [`<button>`](https://hypeapps.dev/docs/reference/button.md): A tappable button that runs an action: a fetch, a navigation or a statement.
- [`<checkbox>`](https://hypeapps.dev/docs/reference/checkbox.md): A checkbox with a label; its state goes into a variable by name.
- [`<chip>`](https://hypeapps.dev/docs/reference/chip.md): A compact chip: a label, a filter that toggles, a single choice in a set, or an action.
- [`<color-picker>`](https://hypeapps.dev/docs/reference/color-picker.md): A color picker: a hue ring round a disc, with swatches; the chosen color goes into a variable.
- [`<data-cell>`](https://hypeapps.dev/docs/reference/data-cell.md): One cell of a data table row.
- [`<data-column>`](https://hypeapps.dev/docs/reference/data-column.md): A column heading of a data table.

All tags: https://hypeapps.dev/docs/reference.md · The full reference: https://hypeapps.dev/llms.txt
