API ReferenceFieldsBase

Base

The base type shared by all fields.

Params

ParamExampleTypeStatus
labellabel: "Title"String-
labelIconlabelIcon: <Icon />ReactNode-
metadatametadata: {}Object-
visiblevisible: falseBoolean-

Optional params

label

Set the label for the input. Puck will use the key if not provided.

const config = { components: { Example: { fields: { items: { label: "My Field", // ... }, }, // ... }, }, };

labelIcon

Set an icon to display next to the label.

const config = { components: { Example: { fields: { items: { labelIcon: <Icon />, // ... }, }, // ... }, }, };

metadata

An object containing additional information for the field.

const config = { components: { Example: { fields: { items: { metadata: { title: "Hello, world", }, // ... }, }, // ... }, }, };

visible

Show or hide the field. Defaults to true.

const config = { components: { Example: { fields: { items: { visible: false, // ... }, }, // ... }, }, };