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

# Chapters

The Chapters field allows dynamic content creation using predefined templates, storing the content as an array of objects in the database.

<figure><img src="https://strife.app/docs/assets/Screenshot%202023-10-30%20at%2011.57.58.png" alt="" width="375"><figcaption><p>Strife Studio screenshot of a Chapters field</p></figcaption></figure>

### Settings

In addition to the basic settings, this section provides information about unique settings and configurations specific to this field.

> [!NOTE]
> You can find a comprehensive list of all basic settings in the ['Overview' section](https://strife.app/docs/reference/fields.md).

<table><thead><tr><th width="232">Option</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td>Restrict types</td><td>Sets the content templates available for use within the Chapters field</td><td></td></tr><tr><td>Size</td><td>Optional setting for limiting the number of chapters allowed in the chapters editor</td><td></td></tr><tr><td>Hint</td><td>A short description displayed inside the chapters editor to guide authors.</td><td></td></tr></tbody></table>

### Define with JSON

When defining templates using JSON, this field is represented using:

* **Component Name:** `str-chapters`
* **Type:** `chapters`
* Reference ID: `str-chapters`

The settings above map into the `editor.attributes` object inside the JSON definition.

```json
{
  ...
  "editor": {
    "name": "str-chapters",
    "type": "chapters",
    "propertyName": "...",
    "attributes": {
      "hint": "...",
      "size": 3              //Any number
    },
    "options": {
      "availableTypes": [...] //Array of normalized names of content templates
    }
    ...    
  },
  ...
}
```

### Live preview

The compatible Strife Web Component for a Chapters field is any of the container components.

> [!NOTE]
> For more information on live preview and Strife Web Components, please refer to the [Live preview documentation](https://strife.app/docs/reference/live-preview.md).

> [!NOTE]
> For a comprehensive front-end implementation example of the Chapters field, please [consult the provided how-to guide](https://strife.app/docs/tutorials/create-a-dynamic-employee-list-using-the-chapters-field.md).
