Skip to content
KeystoneJS LogoKeystoneJS

Color

Stores hexidecimal RGBA (Red, Green, Blue, Alpha) color values. Presents in the Admin UI as an interactive color picker.

Usage

JS
const { Color } = require('@keystonejs/fields');

keystone.createList('Product', {
  fields: {
    heroColor: { type: Color },
  },
});

Config

OptionTypeDefaultDescription
isRequiredBooleanfalseDoes this field require a value?
isUniqueBooleanfalseAdds a unique index that allows only unique values to be stored

On this page

  • Usage
  • Config
Edit on GitHub