appica-dev

Color Area

Forms

About

A draggable 2D color plane for picking two channels at once (like saturation and brightness), with keyboard, RTL and form support.

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

Code

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

Usage.tsx

"use client";

import { ColorArea } from "@/components/ui/color-area";
import { Button } from "@/components/ui/button";
import { useState } from "react";

export default function ColorAreaForm() {
  const [submitted, setSubmitted] = useState<string | null>(null);

  return (
    <form
      className="flex flex-col items-start gap-4"
      onSubmit={(event) => {
        event.preventDefault();
        const data = new FormData(event.currentTarget);
        setSubmitted(
          `saturation ${data.get("saturation")}, brightness ${data.get("brightness")}`,
        );
      }}
    >
      <ColorArea
        defaultValue="hsb(217, 76%, 96%)"
        xChannel="saturation"
        yChannel="brightness"
        xName="saturation"
        yName="brightness"
        aria-label="Brand color"
        className="size-40"
      />
      <Button type="submit" size="sm">
        Submit
      </Button>
      {submitted ? (
        <p className="text-foreground-muted font-mono text-xs">{submitted}</p>
      ) : null}
    </form>
  );
}

More by appica-dev

View all
  • Border Beam

    Border Beam

    53
  • Text Animate

    Text Animate

    19
  • Carousel

    Carousel

    14
  • Sparkline

    Sparkline

    7
  • Avatar

    Avatar

    7
  • Table of Contents

    Table of Contents

    6
  • Background Pattern

    Background Pattern

    5
  • Autocomplete

    Autocomplete

    2

More in Forms

View all
  • Premium Auth

    Premium Auth

    524
  • Contact Card

    Contact Card

    1K
  • Book A Demo 1

    Book A Demo 1

    73
  • Login 1

    Login 1

    53
  • Form

    Form

    137
  • Card Studio

    Card Studio

    41
  • Modern & Stunning sign in

    Modern & Stunning sign in

    1.6K
  • SignInPage

    SignInPage

    668