netlify-cms-color-field
v1.0.0
Published
Input field that only accepts hex colors and shows color preview.
Downloads
3
Maintainers
Readme
netlify-cms-color-field
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.