Adds a color field for selecting colors in the Payload admin UI. The selected value is stored as a regular string field. A plugin function accepts a list of suggested colors, and the field is added to collections through a helper function. Requires Payload 3.
A Payload CMS color picker field plugin.
Installation
npm i @mvriu5/payload-color-picker1
Stars
0
Forks
5
Open Issues
1 months ago
Last Updated
17
Weekly Downloads
v1.0.2
npm Version
23.0 KB
Unpacked Size
0
Dependencies
Trends appear after 7 days of data. Collecting since Oct 22 — 2 daily snapshots so far.
Trends appear after 7 days of data. Collecting since Oct 22 — 2 daily snapshots so far.
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1310974206-root)<a href="https://payloaddirectory.dev/plugins/1310974206-root"><img src="https://payloaddirectory.dev/badge/1310974206-root.svg" alt="Payload Directory"></a>README
A Payload CMS plugin for selecting colors in the admin UI and storing the selected value as a string.
The package structure and development environment are prepared. The field, picker UI, and plugin behavior will be implemented in the next step.
import { colorField, payloadColorPlugin } from "@mvriu5/payload-color-picker"
export default buildConfig({
collections: [
{
slug: "posts",
fields: [
colorField({
name: "color",
label: "Color",
}),
],
},
],
plugins: [
payloadColorPlugin({
suggestedColors: ["#111827", "#3B82F6", "#22C55E", "#F59E0B"],
}),
],
})
The selected color is stored as a regular string field.
cp dev/.env.example dev/.env
docker compose up -d
pnpm dev
pnpm build
Tags
payload better fields plugin
Improved admin panel fields for slugs, numbers, patterns, ranges, colours, phones, alerts and dates
531.4k/wk294v3
payload color picker field
A color picker field for Payload collections that stores HEX color values
51582/wk41v3
payload icon picker
Icon picker field for the Payload admin with adapters for Lucide, Tabler, Heroicons, Phosphor and more
4321/wk0v3
payload icon picker
Icon picker field with searchable dropdown or drawer grid that stores the icon name and raw SVG
841.1k/wk51v3
encrypted fields
Encrypt individual field values in the database with an encryptedField helper for collections
6955/wk83v3
payload plugin json form builder
Turn a Payload JSON field into real admin fields with an in-admin form builder
6762/wk29v3