klyv-ui

Slider

Forms

About

A native range input restyled with a gradient-filled track and rounded thumb, for picking a numeric value such as volume or zoom.

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

import { Slider } from "@/components/ui/slider";
import { useState } from "react";

export default function SliderDemo() {
  const [volume, setVolume] = useState(42);

  return (
    <div className="flex w-full items-center justify-center bg-canvas p-8">
      <div className="flex w-full max-w-sm flex-col gap-4 rounded-[var(--radius-card)] border border-line bg-surface p-6 shadow-[var(--shadow-card)]">
        <div className="flex items-center justify-between">
          <span className="text-[13px] font-semibold text-ink">Volume</span>
          <span className="text-[13px] font-medium tabular-nums text-ink-faint">
            {volume}%
          </span>
        </div>
        <Slider
          aria-label="Volume"
          value={volume}
          min={0}
          max={100}
          onChange={(event) => setVolume(Number(event.target.value))}
        />
      </div>
    </div>
  );
}

More by klyv-ui

View all
  • Gantt Chart

    Gantt Chart

    104
  • Shader Canvas

    Shader Canvas

    69
  • Klyv Animated Beam

    Klyv Animated Beam

    65
  • Pareto Chart

    Pareto Chart

    60
  • Fluid Canvas

    Fluid Canvas

    44
  • Sunburst Chart

    Sunburst Chart

    35
  • Morphing Text

    Morphing Text

    32
  • Time Slot Picker

    Time Slot Picker

    30

More in Forms

View all
  • Premium Auth

    Premium Auth

    589
  • Contact Card

    Contact Card

    1.1K
  • Login 1

    Login 1

    70
  • Contact Form

    Contact Form

    28
  • Form

    Form

    4
  • HeroUI Field Error

    HeroUI Field Error

    13
  • Form

    Form

    6
  • Book A Demo 4

    Book A Demo 4

    69