> From the [Strife developer docs](https://strife.app/docs/reference/field-reference/fields.chapters). Every page is listed in [llms.txt](https://strife.app/docs/llms.txt).

# fields.chapters()

Repeatable nested-content list, each item shaped by a content template.

Repeatable nested-content list. Maps to editor `{ name: 'str-chapters', type: 'chapters' }`. Each item is itself shaped by one of the content templates named in `allow`.

## Example

```ts
fields.chapters({
  label: 'Sections',
  allow: ['hero', 'text-block', 'gallery'],
  size: 20,
})
```

## Options

| Option         | Type             | Required | Description                                                                                                                                              |
| -------------- | ---------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `label`        | `string`         | Yes      | Label shown to editors in Strife Studio.                                                                                                                 |
| `description`  | `string`         | No       | Shown as a note under the field while it is empty.                                                                                                                                |
| `localizable`  | `boolean`        | No       | When `true`, output is `Record<string, unknown[]>` — one chapter list per locale. Otherwise one list is shared by every locale, texts included. See [Languages inside a chapter](#languages-inside-a-chapter). |
| `propertyName` | `string`         | No       | Override the stored property name.                                                                                                                       |
| `allow`        | `string[]`       | No       | Allowed content-template names (`type: 'content'`) for items. Omit to allow any.                                                                         |
| `size`         | `number \| null` | No       | Maximum number of items.                                                                                                                                 |

> [!NOTE]
> **v1 limitation:** the output type is `unknown[]` (or `Record<string, unknown[]>` when localizable) regardless of what's in `allow`. Recursive type inference — resolving each chapter item to its own template's generated interface — isn't implemented yet; cast the array to the expected item shape after `Infer<>` if you need it typed.

## Output type

`unknown[]`, or `Record<string, unknown[]>` when `localizable: true`.

## Languages inside a chapter

The chapters field's own `localizable` decides where the language lives, for everything in the list:

* **`localizable: true`**: each locale has its own list, with its own chapters, order and texts.
* **Otherwise**: one list is shared by every locale. The chapters, their order and their texts are the same in every language.

`localizable` on a field inside the chapter type has no effect, at any depth: a text field marked `localizable` inside a shared list still holds one value for every locale. To give a section its own text per language, make the chapters field localizable.

```ts
fields.chapters({
  label: 'Sections',
  allow: ['text-block'],
  localizable: true, // one list per locale: each language has its own sections and texts
})
```

Content written by an older version of the server may still hold a value keyed by locale inside a shared list, such as `"heading": { "en": "Ground floor" }`. When every key is one of the team's languages, the content index in `@strifeapp/strife` 1.26.0 and later reads it as one value. From 2.0.1, that value is the first one found in this order:

1. In a localizable chapters list, the row's own locale.
2. The team's default locale.
3. The other languages, in the order the team lists them.

Only `null` and `""` count as missing, so `false` and `0` are values. A write that changes the field stores it as a plain value. A write that sends the field back unchanged leaves it as it is.

When a key is a language the team has since removed, the value is left as it is, and the MCP server won't change part of it. Set the whole field again to store it as a plain value.

## See also

* [Chapters](https://strife.app/docs/reference/fields/chapters.md) — the same editor, documented from the Strife Studio UI side.
* [`fields.contentTemplate()`](https://strife.app/docs/reference/field-reference/fields.contenttemplate.md) — embeds a single content template inline instead of a repeatable list.
