Puck AI beta
Read docs
API ReferenceAIConfigurationComponents

Component AI Config

Configure AI behavior for a component. Extends the Puck ComponentConfig.

const config = {
  components: {
    HeadingBlock: {
      ai: {
        instructions: "Always place this first",
      },
      fields: {
        title: {
          type: "text",
        },
      },
      render: ({ title }) => <h1>{title}</h1>,
    },
  },
};

Params

ParamExampleTypeStatus
instructions"Always place this first"String-
excludefalseBoolean-

Optional params

instructions

Instructions that must be taken into account when considering this component.

const config = {
  components: {
    HeadingBlock: {
      ai: {
        instructions: "Always place this first",
      },
      fields: {
        title: {
          type: "text",
        },
      },
      render: ({ title }) => <h1>{title}</h1>,
    },
  },
};

exclude

Exclude this component when generating a page. false by default.

const config = {
  components: {
    HeadingBlock: {
      fields: {
        title: { type: "text" },
      },
      ai: {
        exclude: true,
      },
      render: ({ title }) => <h1>{title}</h1>,
    },
  },
};