Color Area
An interactive color selection tool that enables users to pick a color by adjusting both hue and saturation within a 2D space. It supports different color models.
Basic
A color area allows users to select a color interactively.
Composed components
When you install this component via the CLI, it automatically loads all composed components, so you don’t need to add them individually.
This component comes packed with several components to enhance functionality and provide a seamless experience.
Installation
Install the component via the CLI in one command.
npx shadcn@latest add @intentui/color-area
Manual installation
Use this approach if you prefer to install and wire up the component yourself instead of using the CLI.
npm install react-aria-components
Anatomy
import { ColorArea } from "@/components/ui/color-area"
<ColorArea />Channel
Specify the color channels for the horizontal and vertical axes using the xChannel and yChannel properties.
Space
Define the color space for operation, which must align with the xChannel and yChannel. The default is set based on the color or defaultColor value. Valid types include rgb, hsl, and hsb.
Controlled
Control the color area by specifying channels for the horizontal (xChannel) and vertical (yChannel) axes.
Disabled
Disable the color area component. While it's possible to disable the thumb component, it's generally not advisable.
Color area with slider
You can use the color area with the slider to control the color.
Design Intent UI
Build modern web apps faster with 1000+ resources across components, blocks, patterns, templates, and starter kits.