1.0.0 • Published 4 years ago

netlify-cms-color-field v1.0.0

Weekly downloads
10
License
MIT
Repository
-
Last release
4 years ago

netlify-cms-color-field

Check out a demo!

Input field that only accepts hex colors. Shows you a preview of the entered color in author and preview mode.

Install

As an npm package:

npm i netlify-cms-color-field
import { Control, Preview } from 'netlify-cms-color-field'

CMS.registerWidget('colorField', Control, Preview)

Via script tag:

<script src="https://unpkg.com/netlify-cms-color-field@^1.0.0"></script>

<script>
  CMS.registerWidget('colorField', Control, Preview)
</script>

How to use

Add to your Netlify CMS configuration:

    fields:
      - { name: <fieldname>, label: <fieldlabel>, widget: colorField }

Support

For help with this widget, open an issue or ask the Netlify CMS community in Gitter.