Component

Color Picker Input

Color selection components including native picker and preset swatches

  • Component
  • Tailwind
  • MIT

Preview

Live component

Interactive preview
Open preview
9:41 100%
devsnips.site/library/tailwind/components/input/color-picker/
fluid · no fixed width 100%
No dependencies Production-ready

Install

Add to your project

terminal
npx devsnips add Tailwind/Components/Input/color-picker
registry path: Tailwind/Components/Input/color-picker

Source

Implementation

code.html
<!-- Color Picker - Standard -->
<div>
  <label class="block text-sm font-medium text-gray-700 mb-2">Brand Color</label>
  <div class="flex items-center gap-4">
    <input type="color" value="#3B82F6" class="w-14 h-14 rounded-lg border-2 border-gray-200 cursor-pointer" />
    <input type="text" value="#3B82F6" class="flex-1 px-4 py-3 bg-white border border-gray-300 rounded-lg font-mono text-sm focus:outline-none focus:ring-2 focus:ring-blue-500" />
  </div>
</div>

<!-- Color Picker - Presets -->
<div class="mt-6">
  <label class="block text-sm font-medium text-gray-700 mb-3">Accent Color</label>
  <div class="flex items-center gap-3">
    <button class="w-10 h-10 rounded-full bg-blue-500 ring-2 ring-offset-2 ring-blue-500"></button>
    <button class="w-10 h-10 rounded-full bg-purple-500 hover:ring-2 hover:ring-offset-2 hover:ring-purple-500 transition-all"></button>
    <button class="w-10 h-10 rounded-full bg-pink-500 hover:ring-2 hover:ring-offset-2 hover:ring-pink-500 transition-all"></button>
    <button class="w-10 h-10 rounded-full bg-green-500 hover:ring-2 hover:ring-offset-2 hover:ring-green-500 transition-all"></button>
    <button class="w-10 h-10 rounded-full bg-amber-500 hover:ring-2 hover:ring-offset-2 hover:ring-amber-500 transition-all"></button>
    <button class="w-10 h-10 rounded-full bg-gray-300 hover:ring-2 hover:ring-offset-2 hover:ring-gray-400 transition-all"></button>
  </div>
</div>

<!-- Color Picker - Gradient Swatches -->
<div class="mt-6">
  <label class="block text-sm font-medium text-gray-700 mb-3">Theme Gradient</label>
  <div class="grid grid-cols-4 gap-3">
    <button class="h-12 rounded-lg bg-gradient-to-r from-blue-500 to-cyan-500 hover:ring-2 hover:ring-offset-2 hover:ring-blue-500 transition-all"></button>
    <button class="h-12 rounded-lg bg-gradient-to-r from-purple-500 to-pink-500 hover:ring-2 hover:ring-offset-2 hover:ring-purple-500 transition-all"></button>
    <button class="h-12 rounded-lg bg-gradient-to-r from-amber-500 to-orange-500 hover:ring-2 hover:ring-offset-2 hover:ring-amber-500 transition-all"></button>
    <button class="h-12 rounded-lg bg-gradient-to-r from-green-500 to-emerald-500 hover:ring-2 hover:ring-offset-2 hover:ring-green-500 transition-all"></button>
  </div>
</div>
32 lines UTF-8 · LF · Spaces: 2
DevSnips AI ready Claude · Cursor · Windsurf

Agent skill & Model Context Protocol

Pass this component straight into your AI workflow. DevSnips exposes each resource as a structured, addressable registry entry, so your agent installs the real files instead of approximating them.

devsnips://components/input/color-picker
Prompt instruction
I want to use this DevSnips resource in production:

Page:
https://devsnips.site/library/tailwind/components/input/color-picker/

Install: npx devsnips add
Tailwind/Components/Input/color-picker

This is the Color Picker Input — Color selection components including native picker and preset swatches

Use this DevSnips resource as the starting point for my project.
Adapt it to my project's stack and conventions, fix any issues,
and make it production-ready while preserving its intended design
and behavior.

Paste into ChatGPT, Claude or your agent — it already carries the page URL and the exact install path.

Resource URI
devsnips://components/input/color-picker