# Slider

An input where the user selects a value from within a given range.

Section: Components / Inputs
Page: https://ui.heyramzi.com/components/slider
Import path: `@heyramzi/ui/shadcn/slider`

## Import

```ts
import { Slider } from "@heyramzi/ui/shadcn/slider";
```

## Usage

```svelte
<Slider type="single" bind:value max={100} step={1} thumbLabel="Volume" />
```

## Demo

```svelte
<script lang="ts">
	import { Slider } from "@heyramzi/ui/shadcn/slider";

	let value = $state(50);
</script>

<Slider
	type="single"
	bind:value
	max={100}
	step={1}
	thumbLabel="Volume"
	class="max-w-[70%]"
/>
```

## API

| Prop | Type | Default | Notes |
| --- | --- | --- | --- |
| `valueText` | `string` |  | Announced in place of the raw value, for a slider running on stop indices. |
| `thumbLabel` | `string` |  | Names the thumb, which is the element carrying `role="slider"`. |
| `ref` | `HTMLElement \| null` | `null` | bindable |
| `value` |  |  | bindable |
| `class` | `string` |  |  |

Every prop of `Slider.Root` from `bits-ui`, except `child, children`.
