Skip to main content
Version: 2.0.0-beta

Type alias: FieldConfig<T>

Ƭ FieldConfig<T>: Object

This is the configuration object for the field component generated for a property. These configs are generated by default for the properties defined in your collections' configuration, but you can define your own to be used

Type parameters

NameType
Textends CMSType = any

Type declaration

NameTypeDescription
Field?React.ComponentType<FieldProps<T>>You can define a custom Field component to be used for this field. Your custom Field is responsible for rendering the property value and updating it when the user changes it.
Icon?React.ComponentType<SvgIconProps>-
color?stringCSS color, used only in some plugins like the field selector. e.g. "#2d7ff9"
dataTypeDataTypeData type related to this field.
defaultProperty?PropertyOrBuilder<T>You can define a default config for the property. Whenever this field is used, this property or builder will be used as the base values for the resulting property. Any props that are defined in the property will override the ones specified in baseProperty. You can also use a builder function to generate the base property.
description?stringDescription of this field type.
namestringName of this field type. This is not the name of the property.

Defined in

lib/src/types/field_config.tsx:11

Need a hand?

Learn how to get the most out of your project with the help of our consulting team.
Get in touch
Sign up to our newsletter to get the latest news and updates. No spam!