DUI
⌘K

Components / Forms

ColorSwatch

Selectable color radio control.

Preview

1import { ColorSwatch } from "@/components/ui/color-swatch"2
3export function ColorSwatchDemo() {4  return <ColorSwatch color="#3b82f6" selected />5}

idle

The idle style of this component.

1import { ColorSwatch } from "@/components/ui/color-swatch"2
3export function ColorSwatchDemo() {4  return <ColorSwatch color="#3b82f6" selected />5}

Installation

Add the source directly to your project with the shadcn CLI.

npx shadcn@latest add qentrah/DUI/color-swatch

Usage

Install the component, import it from your configured UI directory, and adapt the source to your product. Open the source panel under any example to copy that exact variant.