Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (payload-color-swatch-field-test) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
payload-color-swatch-field
A color swatch field for Payload 3
Installation
npm i @spaced-man/payload-color-swatch-fieldNOTE: At the time of writing this, you may experience package conflicts with Payload Beta. You may need to use npm i with --force
Usage
import type { CollectionConfig } from "payload";
import colorSwatchField from "@modernaut/payload-color-swatch-field";
const Lorem: CollectionConfig = {
slug: "lorem",
admin: {
useAsTitle: "title",
},
fields: [
{
name: "title",
type: "text",
required: true,
},
colorSwatchField,
],
};
export default Lorem;Credit
- "Custom Color Picker" field article -- https://payloadcms.com/blog/building-a-custom-field
- innovixx, Payload Color Picker Field -- https://github.com/innovixx