JSPM

  • Created
  • Published
  • Downloads 1137
  • Score
    100M100P100Q94922F
  • License ISC

A color swatch field for Payload 3

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-field

    NOTE: 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