Hero Ui

HeroUI Color Picker

Component 115

About

HeroUI v3 ColorPicker is a trigger + popover color picker that composes a swatch trigger with an interactive picker surface — color area, sliders, fields and swatch presets — for selecting a color in any format. Built on the real @heroui/react package with @heroui/styles, it supports controlled and uncontrolled value, editable channel fields, hue/alpha sliders, and preset swatches. A thin re-export of the upstream component so consumers install and render the genuine HeroUI primitive.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds HeroUI Color Picker to your project and fits it to your theme.

Code

How HeroUI Color Picker is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client"

import { ColorArea, ColorSlider, ColorSwatch, Label } from "@heroui/react"
import { ColorPicker } from "@/components/ui/heroui-color-picker"

export function Basic() {
  return (
    <ColorPicker defaultValue="#0485F7">
      <ColorPicker.Trigger>
        <ColorSwatch size="lg" />
        <Label>Pick a color</Label>
      </ColorPicker.Trigger>
      <ColorPicker.Popover>
        <ColorArea
          aria-label="Color area"
          className="max-w-full"
          colorSpace="hsb"
          xChannel="saturation"
          yChannel="brightness"
        >
          <ColorArea.Thumb />
        </ColorArea>
        <ColorSlider channel="hue" className="gap-1 px-1" colorSpace="hsb">
          <Label>Hue</Label>
          <ColorSlider.Output className="text-muted" />
          <ColorSlider.Track>
            <ColorSlider.Thumb />
          </ColorSlider.Track>
        </ColorSlider>
      </ColorPicker.Popover>
    </ColorPicker>
  );
}

export default Basic

Dependencies

More by Hero Ui

View all
  • DatePicker

    DatePicker

    473
  • Chip

    Chip

    449
  •  The Pagination

    The Pagination

    368
  • HeroUI Table

    HeroUI Table

    124
  • Skeleton

    Skeleton

    108
  • HeroUI Disclosure Group

    HeroUI Disclosure Group

    98
  • HeroUI AlertDialog

    HeroUI AlertDialog

    85
  • ComboBox

    ComboBox

    78