Generate experiences with Puck AI
Read docs
API ReferenceComponents<FieldTab>

<FieldTab>

Group fields in a tab. Use it in renderFields or the fields override.

Conditions:

  • Tabs are shown in the order they’re rendered.
  • Tabs within tabs aren’t supported.
import { FieldTab } from "@puckeditor/core";
 
const config = {
  components: {
    Example: {
      fields: { title, size, weight },
      renderFields: ({ fields }) => (
        <>
          <FieldTab label="Content">{fields.title}</FieldTab>
          <FieldTab label="Style">
            {fields.size}
            {fields.weight}
          </FieldTab>
        </>
      ),
      // ...
    },
  },
};

Props

ParamExampleTypeStatus
labellabel: "Content"StringRequired
childrenchildren: <input />ReactNode-
valuevalue: "content"String | Number-

Required props

label

The text shown in the tab row.

Optional props

children

The content to render when the tab is selected, like fields.

value

A unique value for the tab. Defaults to label.

Used in ui.fieldTab when this tab is selected.