@michalklor/dynamic-field-overrides
v1.0.1
Published
This plugin allows you to **dynamically override all fields of a specific type** in Payload CMS, replacing their default components with custom ones—seamlessly and automatically!
Downloads
2
Readme
🔗 Dynamic Field Overrides Plugin
This plugin allows you to dynamically override all fields of a specific type in Payload CMS, replacing their default components with custom ones—seamlessly and automatically!
📦 Installation
Install the plugin via your package manager:
pnpm add @shefing/dynamic-field-overrides⚙️ Setup
With this plugin, you can define a field type once and override all occurrences of that type across your collections with a custom React component.
Add the following to your payload.config.ts:
import { DynamicFieldOverrides } from '@shefing/dynamic-field-overrides';
DynamicFieldOverrides({
fieldType: 'text',
componentPath: './component/CustomText',
excludedCollections: ['media'],
xcludedGlobals:[]
}),🔥 Features
- Global Field Overrides: Define a field type in the plugin, and every instance of that type is replaced with your custom component.
- No Manual Configuration: No need to modify each field individually—just set it once and it applies everywhere.
- Seamless Integration: Works with existing Payload CMS structures without disrupting data or functionality.
With this plugin, you gain full control over how Payload CMS fields behave and appear—without the need for repetitive manual overrides! ✨
