A shadcn-style color picker component built with Ark UI primitives.

Installation

npx shadcn@latest add @ark-cn/color-picker

Usage

import * as ColorPicker from "@/components/ui/color-picker"

Read exported parts in src/components/ui/color-picker.tsx and compose the primitive according to the Ark UI pattern for this component.

Examples

Basic

Controlled

#FF5500

Open Controlled

Slider Only

rgba(93, 208, 22, 1)

Swatch Only

Selected color: rgba(235, 94, 65, 1)

Swatches

Value Swatch

Current value: rgba(235, 94, 65, 1)

API reference

This component mirrors the upstream Ark UI primitive.

See the ARK UI documentation for the full API.

Accessibility

See the Ark UI documentation for clarification.