Svelte Range - Bitblue

Range slider inputs with sizes and accent colors

Range slider inputs with sizes and accent colors.

Setup

<script lang="ts">
	import { Range } from '.';
</script>

Default range

<script lang="ts">
	import { Label, Range } from '.';
	let value = $state(50);
</script>

<Label class="mb-2">Volume: {value}</Label>
<Range bind:value />

Sizes

size: sm | md (default) | lg.

<Range size="sm" value={40} />
<Range size="md" value={50} />
<Range size="lg" value={60} />

Colors

Theme colors: gray, red, blue (default), indigo, violet, purple, fuchsia, pink, rose, primary, green.

<Range color="blue" value={50} />
<Range color="green" value={50} />
<Range color="red" value={50} />

Accessibility

  • Pair with a Label and expose the current value in text when helpful.
  • Use native min, max, step, and aria-valuetext where needed.
  • Prefer appearance="auto" for native accent styling and keyboard support.

Props

PropTypeDefaultDescription
valuenumber | string—Bindable value
sizesm | md | lgmdTrack height
coloraccent colorblueAccent color
appearanceauto | noneautoNative vs custom appearance
min / max / stepnumber—Native range attrs
disabled / name / idnative—HTML input attrs
classClassValue—Extra classes
...restHTML input attrs—Other input attributes

© 2026 Bitblue is a registered trademark. All Rights Reserved.