Forms Core Stable

Slider

Restyled native range input with a purple-to-cyan gradient fill that tracks the current value and a glowing thumb

Preview

Installation

pnpm add fancy-ui-svelte
import { Slider } from 'fancy-ui-svelte'

Usage

svelte
<script lang="ts">
  import { Slider } from 'fancy-ui-svelte';
</script>

<Slider />

Examples

Basic Usage

With Bounds

Shows the min/max end labels.

Steps

A stepped 0–5 rating scale.

Props

PropTypeDefaultDescription
value number0Current value; bindable
onValueChange (value: number) => void-Called with the new value on every input event
min number0Lower bound
max number100Upper bound
step number1Increment size, including fractional steps
disabled booleanfalseBlocks dragging and keyboard interaction. Overridden by a surrounding FormField
id string-Element id. Overridden by a surrounding FormField's own controlId
name string-Native name, read on form submission
label string-Accessible name — for a control with no visible Label next to it
showValue booleanfalseShows the current value in a bubble that tracks the thumb
showBounds booleanfalseShows min and max as end labels below the track
class string-Additional CSS classes, applied to the outer wrapper
ref HTMLInputElement | nullnullReference to the underlying input type=range