Muhammad Asif

Apple Color Picker

Component 124

About

A pixel-perfect Apple-style color picker with Grid, Spectrum, and Slider tabs, opacity control, swatches, and recent colors.

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

Code

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

Usage.tsx

"use client";
// Yahan humne file ka sahi naam 'apple-color-picker' likha hai
import { Component } from "@/components/ui/apple-color-picker"; 
import { useState } from 'react';

export default function DemoOne() {
  const [isOpen, setIsOpen] = useState(true); 
  const [color, setColor] = useState('#007AFF');

  return (
    <div className="flex flex-col items-center justify-center w-full h-screen bg-gray-100 transition-colors" style={{ backgroundColor: color }}>
      <button onClick={() => setIsOpen(true)} className="px-4 py-2 bg-white text-black font-semibold rounded-lg shadow-md mb-8">
         Open Color Picker
      </button>
      
      <Component 
        isOpen={isOpen} 
        onClose={() => setIsOpen(false)} 
        initialColor={color}
        onChange={(newColor: string) => setColor(newColor)}
      />
    </div>
  );
}

More by Muhammad Asif

View all
  • Modern Login & Signup

    Modern Login & Signup

    1.2K
  • Apple Calendar Picker

    Apple Calendar Picker

    576
  • Image Expansion

    Image Expansion

    306
  • Apple Emoji Picker

    Apple Emoji Picker

    67
  • Hero Component

    Hero Component

    32