niceui

Slider

A minimal range slider with a sky fill, soft halo thumb and a live value readout.

ReactTailwind CSSTypeScriptFormsMIT · Free
Opacity64%

Installation

01

Install with the shadcn CLI.

$ npx shadcn@latest add https://niceui.dev/r/slider.json
02

Or copy the source manually into components/ui/slider.tsx. No extra dependencies.

Usage

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

export default function Example() {
  return <Slider label="Opacity" defaultValue={64} format={(v) => v + "%"} />;
}

For AI assistants

This page is also available as Markdown and as a shadcn registry item. Use Copy prompt to hand the full source to Claude, Cursor or v0.