Object

Render an object with a subset of fields. Extends Base.

Interactive Demo
Example
params

Hello, world

const config = {
  components: {
    Example: {
      fields: {
        params: {
          type: "object",
          objectFields: {
            title: { type: "text" },
          },
        },
      },
      render: ({ params }) => {
        return <p>{params.title}</p>;
      },
    },
  },
};

Params

ParamExampleTypeStatus
typetype: "array"”array”Required
objectFieldsobjectFields: { title: { type: "text" } }ObjectRequired

Required params

type

The type of the field. Must be "object" for Object fields.

const config = {
  components: {
    Example: {
      fields: {
        items: {
          type: "object",
          objectFields: {
            title: { type: "text" },
          },
        },
      },
      // ...
    },
  },
};

objectFields

Describe the fields for the object. Shares an API with fields.

Can include any field type, including nested object fields.

const config = {
  components: {
    Example: {
      fields: {
        items: {
          type: "object",
          objectFields: {
            title: { type: "text" },
          },
        },
      },
      // ...
    },
  },
};