Skip to content

Custom Fields

For each pageType, you can configure an array of custom fields with their respective types.

These custom fields are editable via sidebar controls for each page of that type, allowing you to have structured data on the page alongside the block content.

Custom fields are defined in the customFields property of a page type. The structure of this array is identical to the sideEditProps of a brick, enabling you to use all sidebar control types and organize custom fields into collapsible sections.

For more information, please refer to the brick’s sidebar controls documentation.

Usage Example

pageTypes: [
...{
name: 'product',
pluralName: 'products',
customFields: [
{
name: 'productID',
label: 'Product ID',
type: types.SideEditPropType.Text,
},
],
},
]

Custom Fields for all Page Types

If you have custom fields that apply to all page types, you can define them in the customFields property of the root React Bricks configuration.