Select Color Swatches
A radio group of colour swatches where a ring springs from one swatch to the next and the colour name rolls over; arrow keys move the selection.
selectcolorswatchesradioproduct
Installation
Run the shadcn CLI in a project with Tailwind CSS. The component lands in components/pixelpapa/select-color-swatches.tsx.
$pnpm dlx shadcn@latest add "https://pixelpapa.com/r/select-color-swatches.json"Manual install+
1. Install the dependencies.
$pnpm add lucide-react motion2. Copy the code from the Code tab above into your project. It imports the cn helper from @/lib/utils, which every shadcn project already has.
Build it with AI
Prefer to let an agent do the wiring? Copy this prompt, describe where the component should go, and paste.
AI prompt
Paste into Claude, Cursor, v0 or Lovable
Add the "Select Color Swatches" component from PixelPapa UI to this project. What it is: A radio group of colour swatches where a ring springs from one swatch to the next and the colour name rolls over; arrow keys move the selection. Category: Selects. Depends on: lucide-react, motion. 1. Install it with the shadcn CLI: npx shadcn@latest add "https://pixelpapa.com/r/select-color-swatches.json" (If the CLI is unavailable, fetch that URL, write files[0].content to components/pixelpapa/select-color-swatches.tsx and install the listed dependencies.) 2. Import it from "@/components/pixelpapa/select-color-swatches" and place it where I describe below. 3. Keep its animation timings and accessibility attributes. Replace the demo copy and data with content that fits my product, and use my existing theme tokens (bg-background, text-foreground, bg-primary, border-border) rather than hard-coded colours. Where to use it: <describe the page and position here>
More selects
- Select Animated DropdownA custom select whose menu springs open with staggered rows and a highlight that glides between options; arrow keys, Home/End, Enter, Escape and typeahead all work.
- Select Avatar PeopleAn assignee picker with gradient initials avatars and presence dots; the chosen avatar pops into the trigger and the list filters from a built-in search.
- Select Cascading MenuA two-level select: pick a group on the left and its children slide in on the right; arrow keys move within a column and Left/Right step between levels.
- Select Combobox SearchA searchable combobox that filters as you type, bolds the matching letters, slides a highlight under the active row and restores the selection on Escape.
- Select Multi ChipsA multi-select whose picks become chips that spring into the field and reflow when removed; type to filter, Enter toggles, Backspace removes the last chip.