# Slider

Sliders allow users to make selections from a range of values.

Sliders reflect a range of values along a bar, from which users may select a single value. They are ideal for adjusting settings such as volume, brightness, or applying image filters.

## Slider

![](/files/-MAgBajlhkL44CcffNEy)

```
New-UDSlider -Value 1
```

## Slider with minimum and maximum values

![](/files/-MAgBdFD-rmsG2i97wAY)

```
New-UDSlider -Min 10 -Max 1000
```

## Disabled Slider

![](/files/-MAgBj8tYfvC5e8PpNyZ)

```
New-UDSlider -Disabled
```

## Slider with custom step size

![](/files/-MAgBh3MAmJE7Q4zvPy8)

```
New-UDSlider -Min 10 -Max 1000 -Step 100
```

## Slider with marks

![](/files/-MAgBlGNQuDbIYRiRVsP)

```
New-UDSlider -Marks
```

## Range based slider

![](/files/-MAgBnakhswcwDHggPdL)

```
New-UDSlider -Value @(1, 10)
```

## OnChange event for slider

```
New-UDSlider -OnChange {
    Show-UDToast -Message $Body 
    Set-TestData $Body
}
```

**New-UDSlider**

| Name              | Type     | Description | Required |
| ----------------- | -------- | ----------- | -------- |
| Id                | string   |             | false    |
| Value             | int\[]   |             | false    |
| Minimum           | int      |             | false    |
| Maximum           | int      |             | false    |
| Disabled          | switch   |             | false    |
| Marks             | switch   |             | false    |
| OnChange          | Endpoint |             | false    |
| Orientation       | string   |             | false    |
| Step              | int      |             | false    |
| ValueLabelDisplay | string   |             | false    |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.powershelluniversal.com/v1/dashboard/components/inputs/slider.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
