Earthling UI

  1. Components
  2. color-picker

ColorPicker

Anatomy

<ColorPicker defaultValue="#ff0000"> <ColorSwatch /> <ColorArea colorSpace="hsb" xChannel="saturation" yChannel="brightness" /> <ColorSlider colorSpace="hsb" channel="hue" /> <ColorField label="Hex" /> </ColorPicker>

Installation

1
Ensure Earthling UI is installed
bun add earthling-ui
2
Import the component from earthling-ui
import { ColorPicker, ColorSwatch, ColorArea, ColorSlider, ColorField, ColorSwatchPicker, ColorSwatchPickerItem, parseColor } from "earthling-ui/color-picker"
The component is ready to use