Skip to content

Browse components

← All components

Color Area

2D color area. Must sit inside ColorPicker.

Install
npx shadcn@latest add https://ui.anuragroy.dev/r/color-area.json

Preview

Loading preview…

Installation

Add the component from this site. The shadcn CLI fetches the registry JSON over HTTPS — no named registry submission required.

Terminal
npx shadcn@latest add https://ui.anuragroy.dev/r/color-area.json

GitHub fallback if the website is down:

Terminal
npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/color-area.json

Usage

Import paths follow your components.json aliases. After install, the default path is @/components/ui/color-area.

Import
import { ColorArea } from "@/components/ui/color-area"
example.tsx
import { ColorArea } from "@/components/ui/color-area"import { ColorPicker } from "@/components/ui/color-picker"export function Example() {  return (    <ColorPicker defaultValue="#3b82f6">      <ColorArea        colorSpace="hsb"        xChannel="saturation"        yChannel="brightness"        className="h-44 w-64"      />    </ColorPicker>  )}

API Reference

ColorArea

React Aria ColorArea. `ColorThumb` is also exported.

PropTypeDefault
colorSpaceColorSpace—
xChannelColorChannel—
yChannelColorChannel—

Notes

  • The color family uses `react-aria-components`, not Base UI.