Color Area

Loading...

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.

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 />

Examples

Channel

Specify the color channels for the horizontal and vertical axes using the xChannel and yChannel properties.

Loading...

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.

Loading...

Controlled

Control the color area by specifying channels for the horizontal (xChannel) and vertical (yChannel) axes.

Loading...

Disabled

Disable the color area component. While it's possible to disable the thumb component, it's generally not advisable.

Loading...

Color area with slider

You can use the color area with the slider to control the color.

Loading...

Component API

ColorArea

The ColorArea component lets users adjust two color channels.

PropTypeDefault
classNamestring-

See the React Aria for the full API reference.