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:
import { Slider } from '@skeletonlabs/skeleton-react';
export default function Anatomy() {
return (
<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>
);
}<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 react/slider
Unable to load component information for svelte/slider