Color Swatch Field

Adds a color swatch picker field with hex and Tailwind color options

Community 0 9/wk MIT v1.2.1

Installation

pnpm add @modernaut/payload-color-swatch-field

About

Color Swatch Field gives a Payload collection a color picker that saves one choice from a row of preset swatches. The palette is defined in the field setup, so editors pick from approved brand colors instead of typing values by hand. Hex codes and Tailwind utility colors can both be offered, and the saved value can be used directly in styling.

Editors can add their own colors and build a personal palette, or the default colors can be locked so they stay in place. A null option can be offered for fields that may stay empty. Each field can have its own palette, and Tailwind colors can be limited to a chosen list.

Package info

Package name
@modernaut/payload-color-swatch-field
Latest version
1.2.1
Unpacked size
88 kB
License
MIT
Weekly downloads
9
Last publish
Oct 28, 2024

Similar plugins

More in Fields

Builds site and admin themes from color harmonies, with contrast checks in light and dark

Pedigree fields, relatives and family-tree views for Payload collections

Color, icon, encrypted and unit-aware measurement fields for Payload admin

Adds theme presets, live preview and contrast checks to the Payload admin

Groups Payload fields inside a drawer that opens from a button or icon

Adds a barcode scan button to text fields in the Payload admin panel