structyl

Color Picker

stable

An HSV color picker with hue and alpha sliders.

Basic usage

Examples

Without alpha slider

Omit the AlphaSlider for opaque color selection only.

Theme color editor

Compose area, hue, alpha and swatch controls for theme builder surfaces.

Primary accent

Features

  • Saturation / value area.
  • Hue + alpha sliders.

Installation

bash
pnpm dlx structyl add color-picker

API Reference

ColorPicker.Root

An HSV color picker.

PropTypeDefault
valueHsvaColor

Controlled color.

onValueChange(value: HsvaColor) => void

Called when the color changes.

disabledboolean

Disable the picker.

ColorPicker.Area

The saturation / value 2-D area.

PropTypeDefault

ColorPicker.HueSlider

The hue slider.

PropTypeDefault

ColorPicker.AlphaSlider

The alpha slider.

PropTypeDefault

ColorPicker.Swatch

A preview of the current color.

PropTypeDefault
Color Picker | structyl