# Input Slider

> Single-thumb or multi-thumb range slider for numeric input and range filters.

## Playground

An interactive playground for InputSlider is embedded above. Open the canonical story on Storybook: [https://storybook.laioutr.cloud/?path=/story/ui-kit-molecules-inputslider--default](https://storybook.laioutr.cloud/?path=/story/ui-kit-molecules-inputslider--default)

## Overview

`InputSlider` is the range slider used by numeric inputs and range filters. The shape of `defaultValue` decides the mode: a single-element array gives one thumb (single-value slider); a two-element array gives two thumbs (min/max range). Both share the same `min`, `max`, and `step` bounds, so consumer state always lines up with what the slider can produce.

Useful when:

- you need a quick numeric input that benefits from drag interaction (volume, quantity, intensity);
- you're driving a price, size, or rating filter where the two-thumb range is the right affordance;
- you want a value-label affordance — set `valueLabel="auto"` to show the value only while dragging, or `valueLabel="always"` to keep it visible.

Switch to `orientation="vertical"` for sliders that read top-to-bottom (column controls, vertical filter panels). `step` snaps the value to integer multiples, so set it to match the catalog's price grain or size grid.

`InputSlider` is Field-aware: inherit `disabled` and `invalid` from a surrounding `<LField>` instead of prop-drilling.

### Range (two thumbs)

#### Example: InputSlider Range

Live preview: [https://storybook.laioutr.cloud/?path=/story/ui-kit-molecules-inputslider--range](https://storybook.laioutr.cloud/?path=/story/ui-kit-molecules-inputslider--range)

```vue-template
<InputSlider
  v-model="priceRange"
  :default-value="[20, 80]"
  :min="0"
  :max="100"
  :step="1"
/>
```

### With format label

Use `formatLabel` to render the value in a localized currency, percentage, or unit format.

#### Example: InputSlider With Format Label

Live preview: [https://storybook.laioutr.cloud/?path=/story/ui-kit-molecules-inputslider--with-format-label](https://storybook.laioutr.cloud/?path=/story/ui-kit-molecules-inputslider--with-format-label)

```vue-template
<InputSlider
  v-model="price"
  :default-value="[42]"
  :min="0"
  :max="100"
  :format-label="(v) => `$${v}`"
  value-label="always"
/>
```

### Vertical

#### Example: InputSlider Vertical

Live preview: [https://storybook.laioutr.cloud/?path=/story/ui-kit-molecules-inputslider--vertical](https://storybook.laioutr.cloud/?path=/story/ui-kit-molecules-inputslider--vertical)

```vue-template
<InputSlider v-model="value" :default-value="[40]" orientation="vertical" />
```

## Feature List

<features :items="["`defaultValue` shape decides the mode: one-element array gives a single thumb; two-element array gives a min/max range with two thumbs","`min`, `max`, and `step` constrain the value space, so price filters never offer a `$13.27` cutoff that returns zero results","v-model passes the current value array, keeping consumer state matched to the slider's shape","Used by `FilterOffCanvasRangeSlider` and any numeric input that needs drag interaction, so behavior stays consistent across filters and configurators","Field-aware: inherits `<LField>` `disabled` and `invalid` state, so wrapped sliders pick up form chrome automatically"]">



</features>

## API Reference

#### Props

```json
{"type":"object","properties":{"defaultValue":{"type":"array","items":{"type":"number"},"default":[0]},"min":{"type":"number","default":0},"max":{"type":"number","default":100},"step":{"type":"number","default":1},"minStepsBetweenThumbs":{"type":"number","default":0},"disabled":{"type":"boolean","default":false},"required":{"type":"boolean","default":false},"invalid":{"type":"boolean","default":false},"orientation":{"enum":["vertical","horizontal"],"type":"string","default":"horizontal"},"inverted":{"type":"boolean","default":false},"name":{"type":"string","default":"void 0"},"id":{"type":"string","default":"void 0"},"valueLabelDisplay":{"enum":["off","auto","always"],"type":"string","default":"off"},"thumbLabels":{"type":"array","items":{"type":"string"},"default":"void 0"},"modelValue":{"type":"array","items":{"type":"number"}}}}
```

#### Events

```json
[{"name":"update:modelValue","description":"","tags":[],"type":"[value: number[] | undefined]","signature":"(event: \"update:modelValue\", value: number[] | undefined): void","schema":[{"kind":"enum","type":"number[] | undefined","schema":["undefined",{"kind":"array","type":"number[]","schema":["number"]}]}]},{"name":"valueCommit","description":"","tags":[],"type":"[value: number[]]","signature":"(event: \"valueCommit\", value: number[]): void","schema":[{"kind":"array","type":"number[]","schema":["number"]}]}]
```
