About
A polished color palette component with smooth hover expansion animations and a copy-to-clipboard feature.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Color Swatch to your project and fits it to your theme.
Code
How Color Swatch is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { ColorSwatch } from "@/components/ui/color-swatch"
const colors = ["#FF5722", "#A85432", "#7A5044", "#5A5050", "#707070", "#9E9E9E", "#C8C8C8", "#F5F5F5"]
export default function Page() {
return (
<div className="min-h-screen bg-background w-full flex items-center justify-center p-8">
<div className="flex items-center">
{colors.map((color, index) => (
<ColorSwatch key={color} color={color} index={index} totalColors={colors.length} />
))}
</div>
</div>
)
}







