About
A labeled text input for entering and validating a hex color value, with description and error message support.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Color Field to your project and fits it to your theme.
Code
How Color Field is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { ColorField } from "@/components/ui/colorfield";
export default function ColorFieldDemo() {
return (
<div className="flex w-full max-w-xs items-center justify-center">
<ColorField
label="Background color"
defaultValue="#A00000"
description="Enter a hex color value."
/>
</div>
);
}
















