boardui

Slider

Forms

About

A single-value or min/max range slider with draggable thumbs, exact-value bubbles, and full keyboard control.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Slider to your project and fits it to your theme.

Code

How Slider is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import * as React from "react";
import { RangeSlider, Slider } from "@/components/ui/slider";

export default function ControlledSliderDemo() {
  const [volume, setVolume] = React.useState(40);
  const [priceRange, setPriceRange] = React.useState([200, 800]);

  return (
    <div className="flex w-full max-w-md flex-col gap-10">
      <Slider label="Volume" value={volume} onChange={setVolume} />
      <RangeSlider
        label="Price range"
        value={priceRange}
        onChange={setPriceRange}
        onChangeEnd={(range) => console.log("saved range", range)}
      />
    </div>
  );
}

Dependencies

More by boardui

View all
  • Social Button

    Social Button

    4
  • Modal Dialog

    Modal Dialog

    3
  • Select

    Select

    1
  • Accordion

    Accordion

    1
  • Segmented Control

    Segmented Control

  • Date Calendar

    Date Calendar

  • Composer Loader

    Composer Loader

  • File Upload

    File Upload

More in Forms

View all
  • Premium Auth

    Premium Auth

    577
  • Login 1

    Login 1

    67
  • Contact Card

    Contact Card

    1.1K
  • Form

    Form

    18
  • Login Card

    Login Card

    36
  • Change Password Form

    Change Password Form

    11
  • Login 2

    Login 2

    15
  • Form

    Form

    3