saturation/uisaturation/ui
DocsComponentsBlocksPagesEmails
GitHub

Sections

IntroductionComponentsInstallationMCPThemingDesignComposing a Detail Panel

Components

Components

General

AvatarBadgeButtonKbdProgressSeparatorSkeletonSpin ResolveSpinnerSplit ButtonSync ButtonTypography

Forms & Inputs

Address LookupCalendar PickerCheckboxColor PickerComboboxDate PickerEmoji PickerFavicon SearchFieldInputInput GroupInput OTPRadio GroupSelectSliderSwitchTextareaToggleToggle Group

Data Display

AccordionAlertCardChartComparison SliderCredit CardData TableEmptyItemMarkdownSaturation Credit CardStatus BadgeTableTree

Detail Panels

Detail FieldDetail HeroDetail Toolbar

Navigation

BreadcrumbCommandMenubarNavigation MenuPaginationTabs

Overlays

CollapsibleContext MenuDialogDropdown MenuHover CardSheet

Layout

Button GroupFont ProviderWizard Split Layout

Feedback

Sonner

Animation & Effects

Animated GroupAnimated ListAnimated NumberBeamBlur FadeBorder TrailGlow EffectLiquid MetalLoading StateParallaxPixelProgressive BlurRippleSpotlightText EffectText Shimmer

Productivity

Agent ChatAI Chat InputCoding AgentFiltersFull CalendarKanbanNovel Editor
Docs/Components/Color Picker

Color Picker

A grid of color swatches for selecting from a predefined palette, with an optional "no color" option.

Loading...

Installation

pnpm dlx shadcn@latest add @saturation-ui/color-picker

Tailwind v4 — Source Scanning

The public shadcn registry installs component source into your project. If Tailwind v4 isn't scanning your components directory, add this to your CSS entry file:

@source "../components";

This ensures all utility classes in CVA variants and data attribute selectors are included in your build.

Usage

import { ColorPicker } from "@/components/ui/color-picker"
<ColorPicker value={color} onChange={setColor} />

getColorClass / getColorTextClass map the palette keys to literal Tailwind classes; the soft pill tint for the same keys is getColorPillTint from the color lib helpers.

API Reference

PropTypeDefaultDescription
value*string | null—Currently selected color key (null = no color).
onChange*(color: string | null) => void—Called with the selected color key, or null for the no-color option.
colorsreadonly string[]DEFAULT_COLORSPalette keys to show. Defaults to the 16-color Tailwind palette.
showNonebooleantrueWhether to render the "no color" swatch.
noneLabelstring"None"Accessible label for the no-color swatch.
columnsnumber8Number of swatches per row.
swatchSize"sm" | "md" | "lg""md"Swatch dimensions.
PreviousCollapsibleNextCombobox

On This Page

  • Installation
  • Usage
  • API Reference