1. framework components
  2. slider

Slider

Capture input from a range of values.

Color

Change the track, range, and thumb color using utility classes or custom CSS variables to match your design system.

Disabled

Set the disabled prop to enable the disabled state.

Read-Only

Set the readOnly prop to enable the disabled state.

Multiple Thumbs

Set a value array of two values to enable start and end thumbs.

Direction

Set the text direction (ltr or rtl) using the dir prop.

Anatomy

Here’s an overview of how the Slider component is structured in code:

svelte
<script lang="ts">
	import { Slider } from '@skeletonlabs/skeleton-svelte';
</script>

<Slider>
	<Slider.Label />
	<Slider.Control>
		<Slider.Track>
			<Slider.Range />
		</Slider.Track>
		<Slider.Thumb>
			<Slider.HiddenInput />
		</Slider.Thumb>
	</Slider.Control>
	<Slider.MarkerGroup>
		<Slider.Marker />
	</Slider.MarkerGroup>
	<Slider.ValueText />
</Slider>

API Reference

Unable to load component information for svelte/slider

View page on GitHub