---
title: "Shadcn Range Slider"
description: "A slider in five skins (pill, classic, dotted, tile and flight) plus a circular dial. Free shadcn/ui Range Slider component for React, Next.js and Tailwind CSS."
url: https://avaraui.com/docs/nextjs/range-slider
---

# Shadcn Range Slider

A slider in five skins (pill, classic, dotted, tile and flight) plus a circular dial. One thumb or two. Headings and readouts are yours to place around it.

## Installation

Add the component by URL — no setup needed:

```bash
npx shadcn@latest add https://avaraui.com/r/range-slider.json
```

Or register the @avara-ui registry once per project and add it by name:

```bash
npx shadcn@latest registry add @avara-ui=https://avaraui.com/r/{name}.json
npx shadcn@latest add @avara-ui/range-slider
```

## Price range

Two thumbs. The histogram, stay count and Min and Max cards are your own markup around the slider.

```tsx
"use client";

import { useState } from "react";

import { RangeSlider, type RangeSliderValue } from "@/components/custom/blocks/RangeSliderBlock";

const usd = (v: number) => `$${v.toLocaleString("en-US")}`;

// Listings per $40 bucket, $0 to $1,000.
const LISTINGS = [3, 5, 8, 12, 18, 24, 31, 38, 42, 40, 36, 33, 29, 26, 22, 19, 15, 12, 9, 7, 5, 4, 3, 2, 2];
const PEAK = Math.max(...LISTINGS);

export default function PriceFilter() {
  const [price, setPrice] = useState<RangeSliderValue>([240, 720]);
  const [lo, hi] = price as [number, number];
  const stays = LISTINGS.reduce((n, count, i) => (i * 40 + 20 >= lo && i * 40 + 20 <= hi ? n + count : n), 0);

  return (
    <div className="w-full rounded-[1.75rem] bg-card p-5 ring-1 ring-[#F7F7F6] shadow-[0_1px_2px_rgb(0_0_0/0.04),0_18px_40px_-24px_rgb(0_0_0/0.22)] dark:ring-border/60">
      <div className="flex items-start justify-between gap-3">
        <div>
          <p className="text-base font-semibold tracking-tight text-foreground">Price per night</p>
          <p className="mt-0.5 text-xs text-muted-foreground">Lisbon, 12 to 15 June</p>
        </div>
        <span className="rounded-full bg-primary/10 px-3 py-1 text-xs font-semibold tabular-nums text-primary">
          {stays} stays
        </span>
      </div>

      {/* The bars share the slider's inset, so each one sits over its own price. */}
      <div className="mx-3 mt-6 flex h-16 items-end gap-[3px]" aria-hidden>
        {LISTINGS.map((count, i) => {
          const mid = i * 40 + 20;
          return (
            <span
              key={i}
              className={`flex-1 rounded-[4px] transition-colors duration-500 ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none ${
                mid >= lo && mid <= hi ? "bg-primary" : "bg-muted"
              }`}
              style={{ height: `${Math.max(8, (count / PEAK) * 100)}%` }}
            />
          );
        })}
      </div>

      <RangeSlider
        label="Price per night"
        min={0}
        max={1000}
        step={10}
        value={price}
        onValueChange={setPrice}
        marks={[0, 250, 500, 750, 1000]}
        format={usd}
        className="mt-2"
      />

      <div className="mt-4 grid grid-cols-2 gap-3">
        <div className="rounded-[1.25rem] bg-[#F7F7F6] px-4 py-3 dark:bg-background/50">
          <p className="text-xs text-muted-foreground">Minimum</p>
          <p className="text-xl font-semibold tracking-tight tabular-nums text-foreground">{usd(lo)}</p>
        </div>
        <div className="rounded-[1.25rem] bg-[#F7F7F6] px-4 py-3 dark:bg-background/50">
          <p className="text-xs text-muted-foreground">Maximum</p>
          <p className="text-xl font-semibold tracking-tight tabular-nums text-foreground">
            {hi >= 1000 ? `${usd(hi)}+` : usd(hi)}
          </p>
        </div>
      </div>
    </div>
  );
}
```

## Single value

One thumb, controlled from your own state. The player card and icon are your own markup.

- `value` with `onValueChange` makes it controlled.

```tsx
"use client";

import { useState } from "react";

import { RangeSlider, type RangeSliderValue } from "@/components/custom/blocks/RangeSliderBlock";
import { MusicIcon, Volume2Icon, VolumeXIcon } from "@/components/custom/ui/animated-icons";

export default function PlayerVolume() {
  const [volume, setVolume] = useState<RangeSliderValue>(64);
  const level = volume as number;

  return (
    <div className="w-full rounded-[1.75rem] bg-card p-5 ring-1 ring-[#F7F7F6] shadow-[0_1px_2px_rgb(0_0_0/0.04),0_18px_40px_-24px_rgb(0_0_0/0.22)] dark:ring-border/60">
      <div className="flex items-center gap-4">
        <span className="grid size-16 shrink-0 place-items-center rounded-[1.25rem] bg-primary text-primary-foreground shadow-[0_12px_24px_-12px_color-mix(in_oklab,var(--primary)_70%,transparent)]">
          <MusicIcon className="size-7" aria-hidden />
        </span>
        <div className="min-w-0">
          <p className="truncate text-base font-semibold tracking-tight text-foreground">Golden Hour Drive</p>
          <p className="truncate text-sm text-muted-foreground">Night Signals · 3:42</p>
        </div>
      </div>

      <div className="mt-5 rounded-[1.25rem] bg-[#F7F7F6] px-4 pb-3 pt-4 dark:bg-background/50">
        <div className="mb-1 flex items-center justify-between">
          <p className="text-xs font-medium text-muted-foreground">Volume</p>
          <p className="text-2xl font-semibold tracking-tight tabular-nums text-foreground">{level}%</p>
        </div>
        <div className="flex items-center gap-3">
          {level === 0 ? (
            <VolumeXIcon className="size-5 shrink-0 text-muted-foreground" aria-hidden />
          ) : (
            <Volume2Icon className="size-5 shrink-0 text-muted-foreground" aria-hidden />
          )}
          <RangeSlider label="Volume" value={volume} onValueChange={setVolume} format={(v) => `${v}%`} />
        </div>
      </div>
    </div>
  );
}
```

## Stepped

The dotted bar: a dot per step and a slim thumb that stays inside the range.

```tsx
"use client";

import { useState } from "react";

import { RangeSlider, type RangeSliderValue } from "@/components/custom/blocks/RangeSliderBlock";
import { UsersIcon } from "@/components/custom/ui/animated-icons";

const PRICE_PER_SEAT = 12;
const seats = (v: number) => `${v} ${v === 1 ? "seat" : "seats"}`;

export default function TeamSize() {
  const [team, setTeam] = useState<RangeSliderValue>(4);
  const count = team as number;

  return (
    <div className="w-full rounded-[1.75rem] bg-card p-5 ring-1 ring-[#F7F7F6] shadow-[0_1px_2px_rgb(0_0_0/0.04),0_18px_40px_-24px_rgb(0_0_0/0.22)] dark:ring-border/60">
      <div className="mb-8 flex items-center justify-between">
        <div className="flex items-center gap-3">
          <span className="grid size-10 place-items-center rounded-full bg-primary/10 text-primary">
            <UsersIcon className="size-5" aria-hidden />
          </span>
          <p className="text-sm font-medium text-foreground">Team size</p>
        </div>
        <p className="text-3xl font-semibold tracking-tight tabular-nums text-foreground">{seats(count)}</p>
      </div>

      <RangeSlider
        variant="dotted"
        label="Team size"
        min={1}
        max={10}
        value={team}
        onValueChange={setTeam}
        format={seats}
      />

      <div className="mt-5 flex items-center justify-between rounded-[1.25rem] bg-[#F7F7F6] px-4 py-3 dark:bg-background/50">
        <div>
          <p className="text-xs text-muted-foreground">${PRICE_PER_SEAT} per seat</p>
          <p className="text-xl font-semibold tracking-tight tabular-nums text-foreground">
            ${count * PRICE_PER_SEAT}
            <span className="ml-1 text-xs font-medium text-muted-foreground">/ month</span>
          </p>
        </div>
        <span className="rounded-full bg-primary px-3.5 py-1.5 text-xs font-semibold text-primary-foreground">
          Start trial
        </span>
      </div>
    </div>
  );
}
```

## Classic

Two round thumbs on the classic bar, with a tick per hour and a value bubble on hover. The time cards are your own markup.

```tsx
"use client";

import { useState } from "react";

import { RangeSlider, type RangeSliderValue } from "@/components/custom/blocks/RangeSliderBlock";
import { ClockIcon } from "@/components/custom/ui/animated-icons";

const hour = (v: number) => {
  const h = v % 12 === 0 ? 12 : v % 12;
  return `${h}:00 ${v < 12 || v === 24 ? "AM" : "PM"}`;
};

export default function WorkingHours() {
  const [hours, setHours] = useState<RangeSliderValue>([9, 17]);
  const [from, to] = hours as [number, number];

  return (
    <div className="w-full rounded-[1.75rem] bg-card p-5 ring-1 ring-[#F7F7F6] shadow-[0_1px_2px_rgb(0_0_0/0.04),0_18px_40px_-24px_rgb(0_0_0/0.22)] dark:ring-border/60">
      <div className="flex items-center gap-3">
        <span className="grid size-10 place-items-center rounded-full bg-primary/10 text-primary">
          <ClockIcon className="size-5" aria-hidden />
        </span>
        <div>
          <p className="text-sm font-medium text-foreground">Working hours</p>
          <p className="text-xs text-muted-foreground">Bookings open only inside this window</p>
        </div>
      </div>

      <div className="mt-5 grid grid-cols-2 gap-3">
        {[
          { name: "Opens", value: from },
          { name: "Closes", value: to },
        ].map((t) => (
          <div key={t.name} className="rounded-[1.25rem] bg-[#F7F7F6] px-4 py-3 dark:bg-background/50">
            <p className="text-xs text-muted-foreground">{t.name}</p>
            <p className="text-lg font-semibold tracking-tight tabular-nums text-foreground">{hour(t.value)}</p>
          </div>
        ))}
      </div>

      <div className="mt-8 px-1">
        <RangeSlider
          variant="classic"
          label="Working hours"
          min={6}
          max={22}
          value={hours}
          onValueChange={setHours}
          marks={[6, 9, 12, 15, 18, 22]}
          format={hour}
          formatMark={String}
        />
      </div>

      <p className="mt-5 text-center text-xs text-muted-foreground">
        {to - from} open hours a day
      </p>
    </div>
  );
}
```

## Tile

The button tile as a slider, three of them driving a live swatch.

- `label` is drawn on the left of the tile.

```tsx
"use client";

import { useState } from "react";

import { RangeSlider, type RangeSliderValue } from "@/components/custom/blocks/RangeSliderBlock";
import { SlidersHorizontalIcon, SparklesIcon } from "@/components/custom/ui/animated-icons";

export default function Appearance() {
  const [scale, setScale] = useState<RangeSliderValue>(1.2);
  const [opacity, setOpacity] = useState<RangeSliderValue>(100);
  const [blur, setBlur] = useState<RangeSliderValue>(0);

  return (
    <div className="w-full rounded-[1.75rem] bg-card p-5 ring-1 ring-[#F7F7F6] shadow-[0_1px_2px_rgb(0_0_0/0.04),0_18px_40px_-24px_rgb(0_0_0/0.22)] dark:ring-border/60">
      <div className="mb-4 flex items-center gap-2.5">
        <span className="grid size-9 place-items-center rounded-full bg-primary/10 text-primary">
          <SlidersHorizontalIcon className="size-4" aria-hidden />
        </span>
        <p className="text-base font-semibold tracking-tight text-foreground">Appearance</p>
      </div>

      {/* A live swatch, so each tile has a visible effect. */}
      <div className="grid h-32 place-items-center overflow-hidden rounded-[1.25rem] bg-[#F7F7F6] dark:bg-background/50">
        <span
          className="grid size-16 place-items-center rounded-[1.25rem] bg-primary text-primary-foreground shadow-[0_14px_28px_-12px_color-mix(in_oklab,var(--primary)_70%,transparent)] transition-[transform,opacity,filter] duration-200 ease-out motion-reduce:transition-none"
          style={{
            transform: `scale(${scale as number})`,
            opacity: (opacity as number) / 100,
            filter: `blur(${blur as number}px)`,
          }}
        >
          <SparklesIcon className="size-7" aria-hidden />
        </span>
      </div>

      <div className="mt-3 space-y-2.5">
        <RangeSlider
          variant="tile"
          label="Scale"
          min={0.4}
          max={2}
          step={0.1}
          value={scale}
          onValueChange={setScale}
          format={(v) => `${v.toFixed(1)}×`}
        />
        <RangeSlider
          variant="tile"
          label="Opacity"
          min={10}
          max={100}
          step={5}
          value={opacity}
          onValueChange={setOpacity}
          format={(v) => `${v}%`}
        />
        <RangeSlider
          variant="tile"
          label="Blur"
          min={0}
          max={12}
          value={blur}
          onValueChange={setBlur}
          format={(v) => `${v}px`}
        />
      </div>
    </div>
  );
}
```

## Flight

A glowing bar with a plane at its tip, lit from the theme colour. The route card around it is your own markup.

- `format` turns the value into the readout on the right.

```tsx
"use client";

import { useState } from "react";

import { RangeSlider, type RangeSliderValue } from "@/components/custom/blocks/RangeSliderBlock";
import { ArrowLeftRightIcon, ArrowRightIcon } from "@/components/custom/ui/animated-icons";

const TRIP_MINUTES = 795;
const remaining = (v: number) => {
  const left = TRIP_MINUTES - v;
  return `-${Math.floor(left / 60)}H ${String(left % 60).padStart(2, "0")}M`;
};

// Bold type seen through a grid of round holes.
const DOT_MATRIX =
  "bg-foreground bg-clip-text font-bold tracking-wider [-webkit-mask-image:radial-gradient(circle,#000_52%,transparent_58%)] [-webkit-mask-size:3.5px_3.5px] [mask-image:radial-gradient(circle,#000_52%,transparent_58%)] [mask-size:3.5px_3.5px]";

function Stop({ code, city, time }: { code: string; city: string; time: string }) {
  return (
    <div>
      <p className={`text-[2.5rem] leading-none ${DOT_MATRIX}`} style={{ WebkitTextFillColor: "transparent" }}>
        {code}
      </p>
      <p className="mt-2 text-lg font-semibold leading-tight text-foreground">{city}</p>
      <p className="mt-1 text-xs font-medium uppercase tracking-wide text-muted-foreground">{time}</p>
    </div>
  );
}

export default function FlightTracker() {
  const [minutes, setMinutes] = useState<RangeSliderValue>(374);

  return (
    <div className="w-full rounded-[1.75rem] bg-card p-5 ring-1 ring-[#F7F7F6] shadow-[0_1px_2px_rgb(0_0_0/0.04),0_18px_40px_-24px_rgb(0_0_0/0.22)] dark:ring-border/60">
      <div className="flex flex-wrap items-start justify-between gap-x-4 gap-y-4">
        <div className="flex items-start gap-3">
          <Stop code="YYZ" city="Toronto" time="Mon, 6:14 PM" />
          <ArrowRightIcon className="mt-3 size-6 text-primary" aria-hidden />
          <Stop code="HND" city="Tokyo" time="Tue, 7:14 AM" />
        </div>
        <div className="relative w-full rounded-[1.25rem] bg-[#F7F7F6] px-4 py-3 dark:bg-background/50 sm:w-auto sm:min-w-44">
          <p className="text-sm font-semibold text-foreground">ETA 2:15 PM</p>
          <p className="mt-0.5 text-xs text-muted-foreground">Tokyo Time</p>
          <p className="mt-3 text-xs font-bold uppercase tracking-wide text-primary">Dinner in 2:34H</p>
          <span className="absolute right-3 top-3 grid size-7 place-items-center rounded-full bg-card text-foreground shadow-[0_1px_2px_rgb(0_0_0/0.06)]">
            <ArrowLeftRightIcon className="size-3.5" aria-hidden />
          </span>
        </div>
      </div>

      <RangeSlider
        variant="flight"
        label="Flight progress"
        min={0}
        max={TRIP_MINUTES}
        value={minutes}
        onValueChange={setMinutes}
        format={remaining}
        className="mt-5"
      />
    </div>
  );
}
```

## Circular

A ring that stops just short of where it starts, with a clean gap between the fill and the track. Whatever you pass as children sits in the middle.

```tsx
"use client";

import { useState } from "react";

import { CircularRangeSlider, type RangeSliderValue } from "@/components/custom/blocks/RangeSliderBlock";
import { WindIcon } from "@/components/custom/ui/animated-icons";

export default function Thermostat() {
  const [temp, setTemp] = useState<RangeSliderValue>(22);
  const target = temp as number;

  return (
    <div className="w-full rounded-[1.75rem] bg-card p-5 ring-1 ring-[#F7F7F6] shadow-[0_1px_2px_rgb(0_0_0/0.04),0_18px_40px_-24px_rgb(0_0_0/0.22)] dark:ring-border/60">
      <div className="flex items-center justify-between">
        <p className="text-base font-semibold tracking-tight text-foreground">Living room</p>
        <span className="inline-flex items-center gap-1.5 rounded-full bg-primary/10 px-3 py-1 text-xs font-semibold text-primary">
          <WindIcon className="size-3.5" aria-hidden />
          {target < 24 ? "Cooling" : "Idle"}
        </span>
      </div>

      <div className="flex justify-center py-5">
        <CircularRangeSlider
          label="Temperature"
          min={16}
          max={30}
          value={temp}
          onValueChange={setTemp}
          format={(v) => `${v}°`}
          className="max-w-56"
        >
          {/* Children are drawn in the middle of the ring. */}
          <div>
            <p className="text-5xl font-semibold tracking-tight tabular-nums text-foreground">{target}°</p>
            <p className="mt-0.5 text-xs text-muted-foreground">Target</p>
          </div>
        </CircularRangeSlider>
      </div>

      <div className="grid grid-cols-2 gap-3">
        <div className="rounded-[1.25rem] bg-[#F7F7F6] px-4 py-3 dark:bg-background/50">
          <p className="text-xs text-muted-foreground">Inside</p>
          <p className="text-xl font-semibold tracking-tight tabular-nums text-foreground">24°</p>
        </div>
        <div className="rounded-[1.25rem] bg-[#F7F7F6] px-4 py-3 dark:bg-background/50">
          <p className="text-xs text-muted-foreground">Humidity</p>
          <p className="text-xl font-semibold tracking-tight tabular-nums text-foreground">48%</p>
        </div>
      </div>
    </div>
  );
}
```

## About Shadcn Range Slider

**What it is.** Two exports, `RangeSlider` (straight) and `CircularRangeSlider` (a dial). Pass a number for a single thumb or `[from, to]` for a range. Neither draws a heading or readout: build that beside them.

**How it is built.** React and Tailwind, no dependencies. Pointer capture drives the drag, so it works with mouse, touch and pen. Colours come from the theme tokens, so every preset and dark mode restyle it.

**When to use it.** Price and date filters, volume and brightness, seat or quantity pickers.

## For AI agents

**When to use**

- Picking a number or a range from a bounded scale, with live feedback
- Price and quantity filters with a min and a max

**When not to use**

- A few exact choices: use [Toggle Group](https://avaraui.com/docs/nextjs/toggle-group)
- A big figure picked by scrolling: use Scale Picker

**Agent notes**

- Named exports: `RangeSlider` and `CircularRangeSlider` from `@/components/custom/blocks/RangeSliderBlock`
- The slider draws no label or readout. Render those yourself and read the value from `onValueChange`; `label` is only the accessible name
- `CircularRangeSlider` takes `children` for the middle of the ring
- The value shape follows the input: `number` gives a number back, `[number, number]` gives a pair back
- Controlled when `value` is set; hold it in state and update it in `onValueChange`
- Thumbs never cross. Each is `role="slider"`; arrows step, PageUp/PageDown move a tenth, Home/End jump to the ends

**Ask before you pick.** This page has 6 variants. If the user has not named one and has not asked you to choose for them, ask which they want before you install anything or write code, and show every option with its live link. If they ask you to choose, pick from each variant's best-for and avoid-if lines against their brief, and say why. If the user named a variant, use it and do not ask.

All 6 options as live previews: https://avaraui.com/view/range-slider

**When to use it.** A slider for picking a number or a range from a bounded scale. Pass a number for one thumb or `[from, to]` for two. It draws no heading or readout: build those beside it.

**When to use something else:**

- [Toggle Group](https://avaraui.com/docs/nextjs/toggle-group): a few exact choices rather than a scale.

**Gotchas:**

- All of them are skins of the one `range-slider` item: install it once and set `variant` (`pill`, `dotted`, `classic`, `tile`, `flight`) on `RangeSlider`, or use `CircularRangeSlider` for the dial.
- `flight` takes a single thumb; `tile` draws `label` and the value inside the tile.
- One thumb or two is just the shape of `value` (number or `[from, to]`), not a separate design.

### The 6 variants

1. **Pill** (`pill`): The default bar with a pill thumb; one value or a range.
   - Live: https://avaraui.com/view/range-slider/pill
   - Best for: price filters and volume or brightness controls
   - Avoid if: you want visible steps or a bold, branded control
   - Traits: plain bar, one or two thumbs, default skin
   - Install: `npx shadcn@latest add @avara-ui/range-slider`
   - Set these props: `{"variant":"pill"}`
   - Docs: https://avaraui.com/docs/nextjs/range-slider#price-range
2. **Dotted steps** (`dotted`): A dot per step and a slim thumb that stays inside the range.
   - Live: https://avaraui.com/view/range-slider/dotted
   - Best for: a few discrete quantities such as seats or guests
   - Avoid if: the scale is continuous with many values
   - Traits: dot per step, slim thumb, discrete
   - Install: `npx shadcn@latest add @avara-ui/range-slider`
   - Set these props: `{"variant":"dotted"}`
   - Docs: https://avaraui.com/docs/nextjs/range-slider#stepped
3. **Classic** (`classic`): Round thumbs, a tick per step and a value bubble on hover.
   - Live: https://avaraui.com/view/range-slider/classic
   - Best for: time or date range pickers that need readable ticks
   - Avoid if: you want a minimal bar with no ticks
   - Traits: round thumbs, step ticks, hover value bubble
   - Install: `npx shadcn@latest add @avara-ui/range-slider`
   - Set these props: `{"variant":"classic"}`
   - Docs: https://avaraui.com/docs/nextjs/range-slider#classic
4. **Tile** (`tile`): A button-like tile that draws its label and value inside and slides as you drag.
   - Live: https://avaraui.com/view/range-slider/tile
   - Best for: settings panels with several labelled controls, such as colour channels
   - Avoid if: you need a range with two thumbs
   - Traits: label inside, value inside, compact tile
   - Install: `npx shadcn@latest add @avara-ui/range-slider`
   - Set these props: `{"variant":"tile"}`
   - Docs: https://avaraui.com/docs/nextjs/range-slider#tile
5. **Flight** (`flight`): A glowing bar with a plane at its tip and a readout on the right.
   - Live: https://avaraui.com/view/range-slider/flight
   - Best for: travel and booking pages, or a playful progress-like picker
   - Avoid if: you need two thumbs or a sober admin look
   - Traits: glow from theme colour, plane thumb, single thumb
   - Install: `npx shadcn@latest add @avara-ui/range-slider`
   - Set these props: `{"variant":"flight"}`
   - Docs: https://avaraui.com/docs/nextjs/range-slider#flight
6. **Circular dial** (`circular`): A ring dial with a gap between fill and track; children sit in the middle.
   - Live: https://avaraui.com/view/range-slider/circular
   - Best for: thermostat, volume or timer style controls with a central readout
   - Avoid if: space is a thin strip
   - Traits: ring, centre content slot, separate CircularRangeSlider export
   - Install: `npx shadcn@latest add @avara-ui/range-slider`
   - Set these props: `{}`
   - Docs: https://avaraui.com/docs/nextjs/range-slider#circular

## Props Reference

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value`, `defaultValue` | `number \| [number, number]` | the midpoint | One thumb or two. Set `value` to control it. |
| `onValueChange` | `(value) => void` | - | Fires on every move, in the same shape as `value`. |
| `min`, `max`, `step` | `number` | `0`, `100`, `1` | The scale and its snap size. |
| `format` | `(value: number) => string` | `String` | Text for the readout and screen readers. |
| `label` | `string` | - | Accessible name for the thumbs. Not drawn. |
| `marks` | `number[]` | - | Values labelled under the track. `RangeSlider` only. |
| `formatMark` | `(value: number) => string` | `format` | Text for each mark, such as `String` for bare numbers. `RangeSlider` only. |
| `children` | `ReactNode` | - | Drawn in the middle of the ring. `CircularRangeSlider` only. |
| `variant` | `"pill" \| "classic" \| "dotted" \| "tile" \| "flight"` | `"pill"` | The skin. `RangeSlider` only. `classic` adds step ticks and a value bubble. `tile` draws `label` and the value inside; `flight` takes one thumb. |
| `disabled` | `boolean` | `false` | Fades the slider and ignores input. |

## Works with other components

- Put it in a [Card](https://avaraui.com/docs/nextjs/card) or a filter sidebar filter sidebar.
- For a plain shadcn input slider, use `ui/slider`.

## How do I make a price range slider?

Pass a two-number `defaultValue`, such as `[240, 720]`, and a `format` that adds the currency. `onValueChange` returns `[from, to]`.

## How do I control the value?

Set `value` and update it in `onValueChange`. With only `defaultValue` the slider keeps its own state.

## Is it keyboard accessible?

Yes. Each thumb is focusable. Arrow keys move one `step`, PageUp and PageDown move a tenth of the scale, and Home and End jump to the ends. `aria-valuetext` uses your `format`.

---

Live previews and every example: https://avaraui.com/docs/nextjs/range-slider
