Jatin Yadav

Color Swatch

Component 5

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>
  )
}

Dependencies

More by Jatin Yadav

View all
  • Radial Orbital Timeline

    Radial Orbital Timeline

    7.4K
  • Expand Map

    Expand Map

    2.8K
  • Sign In Card

    Sign In Card

    2.6K
  • Project Showcase

    Project Showcase

    2.2K
  • Etheral Shadow

    Etheral Shadow

    2.1K
  • Vapour Text Effect

    Vapour Text Effect

    2K
  • Animated AI Chat

    Animated AI Chat

    1.6K
  • Vertical Image Stack

    Vertical Image Stack

    1.6K