Controlled React color picker with presets, HEX/RGB input, accessible controls, and localization.
Requires React 19, React DOM 19, and Tailwind CSS 4.
npm install @rentnerkev/picker
# or with Bun
bun add @rentnerkev/pickerImport the package styles after Tailwind in your app stylesheet:
@import 'tailwindcss';
@import '@rentnerkev/picker/tailwind.css';'use client'
import { useState } from 'react'
import { CustomColorPicker } from '@rentnerkev/picker'
export function BrandColor() {
const [color, setColor] = useState('#13ecd6')
return (
<CustomColorPicker
label="Brand color"
value={color}
onValueChange={setColor}
locale="en"
/>
)
}Hue, saturation & brightness![]() |
Custom indigo presets![]() |
RGB color input![]() |
Compact color trigger![]() |
Full API & usage · Local playground · MIT license
Run the playground from the repository root:
bun install --cwd playground
bun run playground:devThe separate @rentnerkev/picker/ai entry is for Node.js and Bun tooling. It reads
only this installed package's manifest, README, usage guide, and built TypeScript
declarations. It does not import React, mount UI, run examples, perform network
requests, or require an MCP runtime. Keep it in server/tooling code.
import {
getPackageInfo,
getPackageApi,
getPackageDocumentation,
searchPackageDocumentation,
getPackageExamples,
} from '@rentnerkev/picker/ai'
const info = getPackageInfo()
const api = getPackageApi() // All public typed subpaths and dependent declarations
const usage = getPackageDocumentation('usage') // Full guide, including CSS and providers
const readme = getPackageDocumentation('readme')
const matches = searchPackageDocumentation('messages') // Literal, case-insensitive lines
const examples = getPackageExamples() // Fenced examples from the usage guidegetPackageApi({ subpath: '.', symbol: 'CustomColorPicker' }) validates the symbol
against the selected public entry and returns its complete declaration context.
Unknown subpaths or symbols throw an error. File paths are not accepted. The
./ai entry itself is excluded from this UI API context. The manifest's exports
map remains available through getPackageInfo().
Public website discovery is planned at
llms.txt and
the MCP endpoint. These addresses become
available after the website deployment; this documentation does not claim the
endpoint is already online. The website's read-only tools expose public package
information, API declarations, usage guides, examples, and search, without
accounts, write operations, or access to private project files. The installed
/ai entry works locally without that service. Always use the documentation and
declarations for the version installed in your project.
Shared field sizes/slots, portal defaults, theme.css and pure ./form adapters with draft validity are documented in the usage guide.
See Contributing, the Code of Conduct, Support, and the Security Policy.




