Color Slider

A color slider allows users to adjust an individual channel of a color value.

<ColorSlider
  aria-label="Hue"
  channel="hue"
  defaultValue="hsl(200, 100%, 50%)"
>
  <ColorSliderControl />
</ColorSlider>

Installation

pnpm dlx shadcn@latest add @dotui/color-slider

Usage

Use color sliders to allow users to adjust an individual channel of a color value.

import { ColorSlider, ColorSliderControl } from "@/components/ui/color-slider";
import { Label } from "@/components/ui/field";
<ColorSlider defaultValue="#ff0000" channel="hue">
  <Label>Hue</Label>
  <ColorSliderControl />
</ColorSlider>

Playground

Use the controls below to experiment with different color slider props and see the live preview and code update.

channel
orientation

API Reference

ColorSlider

A color slider allows users to adjust an individual channel of a color value.

PropType
boolean
Orientation
ColorSpace
ColorChannel
ReactNode | function
string | Color
string | Color
function
function

ColorSliderControl

Missing description.

PropType
ReactNode | function

Last updated on 12/21/2025

dotUI

Bringing singularity to the web.

Built with passion by @mehdibha.