Skip to main content

Color Slider

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

On this page
Props
channel
orientation
<ColorSlider defaultValue="hsl(0, 100%, 50%)">
  <Label>Hue</Label>
  <ColorSliderControl />
</ColorSlider>

Installation

npx 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>

Examples

100%

Value: #FF0000

API Reference

ColorSlider

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

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

ColorSliderControl

A color slider control is the interactive track along which the thumb can be dragged.

PropType
ReactNode | function

ColorSliderOutput

A slider output displays the current value of a slider as text.

PropType
ReactNode | function

Last updated on 6/16/2026