RangeSlider
Selects low and high numeric values with paired range and number inputs that stay ordered.
beta
Try it
Invoice amount
<RangeSlider label="Invoice amount" min={0} max={1000} low={100} high={500} unit="USD" />Examples
Invoice range
Invoice amount
<script lang="ts">
import RangeSlider from '@tcpsystems/ui/foundation/RangeSlider';
let low = $state(100);
let high = $state(500);
</script>
<RangeSlider label="Invoice amount" min={0} max={1000} bind:low bind:high unit="USD" />Bounds and steps
Retention window
CPU budget
<script lang="ts">
import RangeSlider from '@tcpsystems/ui/foundation/RangeSlider';
import Stack from '@tcpsystems/ui/foundation/Stack';
let low = $state(1);
let high = $state(90);
let cpuLow = $state(2);
let cpuHigh = $state(2.5);
</script>
<Stack>
<RangeSlider label="Retention window" min={1} max={90} bind:low bind:high unit="days" />
<RangeSlider label="CPU budget" min={0} max={8} step={0.5} bind:low={cpuLow} bind:high={cpuHigh} unit="vCPU" />
</Stack>API
import RangeSlider from '@tcpsystems/ui/foundation/RangeSlider';| Prop | Type | Default |
|---|---|---|
label | string | none |
min | number | none |
max | number | none |
step? | number | 1 |
low? | number | $bindable(min) |
high? | number | $bindable(max) |
names? | [string, string] | none |
unit? | string | '' |
| Hook | Kind |
|---|---|
.tcp-range | Root class |