1.1.1 • Published 1 month ago

@innovixx/payload-color-picker-field v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

Payload Color Picker Field

NPM

A field for Payload that enables an easy color selection field for your Payload projects.

payload-color-picker-field-screenshot.png

Core features:

  • Add a color picker field to your Payload collections
  • Supports HEX color formats

Installation

  yarn add @innovixx/payload-color-picker-field
  # OR
  npm i @innovixx/payload-color-picker-field

Basic Usage

import type { CollectionConfig } from 'payload/types'

import { colorPickerField } from '@innovixx/payload-color-picker-field'

const Pages: CollectionConfig = {
  slug: 'pages',
  admin: {
    useAsTitle: 'title',
  },
  fields: [
    colorPickerField({
      name: 'primaryColor',
      label: 'Primary Color',
      required: true,
      admin: {
        position: 'sidebar',
        description: 'Choose a color for this page',
      },
    }),
  ],
}

export default Pages

Development

To actively develop or debug this plugin you can either work directly within the demo directory of this repo, or link your own project.

  1. Internal Demo

    This repo includes a fully working, self-seeding instance of Payload that installs the plugin directly from the source code. This is the easiest way to get started. To spin up this demo, follow these steps:

    1. First clone the repo
    2. Then, cd YOUR_PLUGIN_REPO && yarn && cd demo && yarn && yarn cleanDev
    3. Now open http://localhost:3000/admin in your browser
    4. Enter username admin@innovixx.co.uk and password Pa$$w0rd!

    That's it! Changes made in ./src will be reflected in your demo. Keep in mind that the demo database is automatically seeded on every startup, any changes you make to the data get destroyed each time you reboot the app.

1.1.1

1 month ago

1.1.0

6 months ago

1.0.1

7 months ago

1.0.0

7 months ago

0.0.3

7 months ago

0.0.2

9 months ago

0.0.1

10 months ago