# definePageLayout

> API reference for definePageLayout: parameters, properties, and return types.

Defines the detail-page layout for a custom object.

```ts
import { definePageLayout } from '@rippling/rippling-sdk';
```

## Properties

| Property | Required | Type | Description |
| --- | --- | --- | --- |
| `apiName` | Required | `string` | Stable identifier for this layout (e.g. `'default'`).<br>Use `'default'` for the layout that drives the \*\*Add\*\* form and the default record detail view. Each custom object supports one `'default'` layout. |
| `name` | Required | `string` | Display name of this layout shown in the layout selector. |
| `blueprintKey` | Optional | `string` | Blueprint key used during install. Defaults to the parent object's api\_name. |
| `headerEdits` | Optional | `[HeaderEdits](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/definePageLayout-headerEdits-9fb23dea)` | Header configuration — title and description fields.<br>**Documented default:** `` `{}` `` |
| `systemCreated` | Optional | `boolean` | Preserve the backend origin flag when importing an existing layout. |
| `tabEdits` | Optional | `[TabEdits](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/definePageLayout-tabEdits-ee39f78e)` | Tab structure — which tabs and sections to show on the detail page.<br>**Documented default:** `` `{}` `` |
| `visibilityConditions` | Optional | `[VisibilityConditions](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/VisibilityConditions-73c19e84)` | Visibility conditions for individual tabs and sections.<br>**Documented default:** `` `{}` `` |

Complete options type

```
{ visibilityConditions?: VisibilityConditions; apiName: string; name: string; systemCreated?: boolean; tabEdits?: { newTabs?: ({ type: "tab_with_sections"; key: TabKey; name: string; sections: ({ type: "fields_section"; section?: SectionReference<NoInfer<O>>; key?: SectionKey; name?: string; fields: ("id" | "createdAt" | "created_at" | "updatedAt" | "updated_at" | "systemUpdatedAt" | "system_updated_at" | "externalId" | "external_id" | "name" | "ownerRole" | "owner_role" | "lastModifiedBy" | "last_modified_by" | "createdBy" | "created_by" | NoInfer<O>["fields"][keyof NoInfer<O>["fields"]] | ObjectScoped<NoInfer<O>, Field> | { field: "id" | "createdAt" | "created_at" | "updatedAt" | "updated_at" | "systemUpdatedAt" | "system_updated_at" | "externalId" | "external_id" | "name" | "ownerRole" | "owner_role" | "lastModifiedBy" | "last_modified_by" | "createdBy" | "created_by" | NoInfer<O>["fields"][keyof NoInfer<O>["fields"]] | ObjectScoped<NoInfer<O>, Field>; hidden?: boolean; editable?: boolean; readOnly?: boolean; defaultValue?: SectionFieldDefaultValue | null; height?: number; canBeDeleted?: boolean; })[]; layout?: SectionFieldsLayout; canBeDeleted?: boolean; canBeRenamed?: boolean; hideName?: boolean; } | { canBeDeleted?: boolean; canBeRenamed?: boolean; hideName?: boolean; type: "related_object_section"; key: SectionKey; name: string; relatedObjectRqlName: RelatedObjectRqlName; relatedFieldRqlName: FieldRqlName; fields: FieldRqlName[]; } | { canBeDeleted?: boolean; canBeRenamed?: boolean; hideName?: boolean; type: "related_field_section"; key: SectionKey; name: string; relatedObjectRqlName: RelatedObjectRqlName; relatedFieldRqlName: FieldRqlName; fields: FieldRqlName[]; layout?: SectionFieldsLayout; } | { canBeDeleted?: boolean; canBeRenamed?: boolean; hideName?: boolean; type: "custom_section"; key: SectionKey; name: string; componentKey: CustomObjectCustomSectionComponentKey; } | { canBeDeleted?: boolean; canBeRenamed?: boolean; hideName?: boolean; type: "reports_section"; key: SectionKey; name: string; reports: { key: string; reportId: string; position: { identifier: string; width: number; height: number; minWidth?: number; minHeight?: number; maxWidth?: number; maxHeight?: number; }; contextualFieldAttrName?: FieldRqlName; visualizationType?: string; }[]; } | { canBeDeleted?: boolean; canBeRenamed?: boolean; hideName?: boolean; type: "canvas_section"; key: SectionKey; name: string; canvasCompositionId: CanvasCompositionId; inputMapping?: Record<string, string>; })[]; canBeDeleted?: boolean; canBeRenamed?: boolean; canBeMoved?: boolean; } | { type: "custom_tab"; key: TabKey; name: string; componentKey: string; })[]; systemTabEdits?: { [x: string]: { newName?: string; deleted?: boolean; newSections?: ({ type: "fields_section"; section?: SectionReference<NoInfer<O>>; key?: SectionKey; name?: string; fields: ("id" | "createdAt" | "created_at" | "updatedAt" | "updated_at" | "systemUpdatedAt" | "system_updated_at" | "externalId" | "external_id" | "name" | "ownerRole" | "owner_role" | "lastModifiedBy" | "last_modified_by" | "createdBy" | "created_by" | NoInfer<O>["fields"][keyof NoInfer<O>["fields"]] | ObjectScoped<NoInfer<O>, Field> | { field: "id" | "createdAt" | "created_at" | "updatedAt" | "updated_at" | "systemUpdatedAt" | "system_updated_at" | "externalId" | "external_id" | "name" | "ownerRole" | "owner_role" | "lastModifiedBy" | "last_modified_by" | "createdBy" | "created_by" | NoInfer<O>["fields"][keyof NoInfer<O>["fields"]] | ObjectScoped<NoInfer<O>, Field>; hidden?: boolean; editable?: boolean; readOnly?: boolean; defaultValue?: SectionFieldDefaultValue | null; height?: number; canBeDeleted?: boolean; })[]; layout?: SectionFieldsLayout; canBeDeleted?: boolean; canBeRenamed?: boolean; hideName?: boolean; } | { canBeDeleted?: boolean; canBeRenamed?: boolean; hideName?: boolean; type: "related_object_section"; key: SectionKey; name: string; relatedObjectRqlName: RelatedObjectRqlName; relatedFieldRqlName: FieldRqlName; fields: FieldRqlName[]; } | { canBeDeleted?: boolean; canBeRenamed?: boolean; hideName?: boolean; type: "related_field_section"; key: SectionKey; name: string; relatedObjectRqlName: RelatedObjectRqlName; relatedFieldRqlName: FieldRqlName; fields: FieldRqlName[]; layout?: SectionFieldsLayout; } | { canBeDeleted?: boolean; canBeRenamed?: boolean; hideName?: boolean; type: "custom_section"; key: SectionKey; name: string; componentKey: CustomObjectCustomSectionComponentKey; } | { canBeDeleted?: boolean; canBeRenamed?: boolean; hideName?: boolean; type: "reports_section"; key: SectionKey; name: string; reports: { key: string; reportId: string; position: { identifier: string; width: number; height: number; minWidth?: number; minHeight?: number; maxWidth?: number; maxHeight?: number; }; contextualFieldAttrName?: FieldRqlName; visualizationType?: string; }[]; } | { canBeDeleted?: boolean; canBeRenamed?: boolean; hideName?: boolean; type: "canvas_section"; key: SectionKey; name: string; canvasCompositionId: CanvasCompositionId; inputMapping?: Record<string, string>; })[]; systemSectionEdits?: { [x: string]: { newName?: string; deleted?: boolean; newLayout?: SectionFieldsLayout; newFields?: ("id" | "createdAt" | "created_at" | "updatedAt" | "updated_at" | "systemUpdatedAt" | "system_updated_at" | "externalId" | "external_id" | "name" | "ownerRole" | "owner_role" | "lastModifiedBy" | "last_modified_by" | "createdBy" | "created_by" | NoInfer<O>["fields"][keyof NoInfer<O>["fields"]] | ObjectScoped<NoInfer<O>, Field> | { field: "id" | "createdAt" | "created_at" | "updatedAt" | "updated_at" | "systemUpdatedAt" | "system_updated_at" | "externalId" | "external_id" | "name" | "ownerRole" | "owner_role" | "lastModifiedBy" | "last_modified_by" | "createdBy" | "created_by" | NoInfer<O>["fields"][keyof NoInfer<O>["fields"]] | ObjectScoped<NoInfer<O>, Field>; hidden?: boolean; editable?: boolean; readOnly?: boolean; defaultValue?: SectionFieldDefaultValue | null; height?: number; canBeDeleted?: boolean; })[]; newHideName?: boolean; }; }; sectionsOrder?: SectionKey[]; }; }; tabsOrder?: TabKey[]; newTabLayout?: TabLayout | null; }; headerEdits?: { newTitleField?: string | NoInfer<O>["fields"][keyof NoInfer<O>["fields"]] | ObjectScoped<NoInfer<O>, Field> | null; titleFieldDeleted?: boolean; newDescriptionField?: string | NoInfer<O>["fields"][keyof NoInfer<O>["fields"]] | ObjectScoped<NoInfer<O>, Field> | null; descriptionFieldDeleted?: boolean; systemFieldEdits?: { [x: string]: { newRqlField?: string | NoInfer<O>["fields"][keyof NoInfer<O>["fields"]] | ObjectScoped<NoInfer<O>, Field> | null; deleted?: boolean; }; }; newFields?: { rqlName: string | NoInfer<O>["fields"][keyof NoInfer<O>["fields"]] | ObjectScoped<NoInfer<O>, Field>; key: HeaderFieldKey; canBeDeleted?: boolean; canBeChanged?: boolean; canBeMoved?: boolean; }[]; headerFieldsOrder?: FieldRqlName[]; headerFieldKeysOrder?: HeaderFieldKey[]; buttons?: JsonObject[]; }; blueprintKey?: string; }
```

## Parameters

| Parameter | Required | Type | Description |
| --- | --- | --- | --- |
| `object` | Required | `O` | — |

TypeScript signature

```ts
definePageLayout<O extends ObjectReference>(object: O, props: PageLayoutOptions<NoInfer<O>>): DefinedPageLayout<O>;
```

## Returns

```
DefinedPageLayout<O>
```

## Availability

| Capability | Support |
| --- | --- |
| Pull into a project | Supported |
| Runtime operations | Not available for this helper |

Source: https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/definePageLayout

> For the complete documentation index, see [llms.txt](https://developer.rippling.com/llms.txt). Public pages have a Markdown version at the same URL with .md added.
