@explified/strapi-plugin-color-picker
v1.1.0
Published
A color picker custom field for Strapi
Maintainers
Readme
@explified/strapi-plugin-color-picker
A color picker custom field plugin for Strapi v5.
Features
- Visual color picker powered by
react-colorful - Stores colors as HEX strings (e.g.
#0055FF) - Configurable preset color swatches
- Built-in HEX validation with customizable regex
- Default color and required field options
- Internationalization support
Installation
npm install @explified/strapi-plugin-color-pickerConfiguration
Add the plugin to your config/plugins.ts (or .js):
export default () => ({
'color-picker': {
enabled: true,
},
});Rebuild and restart Strapi:
npm run build
npm run developUsage
- Open the Content-Type Builder in the Strapi admin panel.
- Add or edit a content type.
- Click "Add another field" and select the "Custom" tab.
- Choose "Color" from the list.
- Configure the field options as needed:
- Default HEX color (default:
#0055FF) - Preset colors as comma-separated HEX values
- RegExp validation pattern
- Required field toggle
- Default HEX color (default:
Compatibility
| Plugin Version | Strapi Version | | -------------- | -------------- | | 1.x | 5.x |
License
MIT
Author
Explified — [email protected]
