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

# Fields

Fields define the structure and content of your templates. Each field specifies the shape and characteristics of the data that will be stored in the database.

> [!WARNING]
> This documentation page is still in progress and may not be fully complete. Please check back later for updates.

### Basic Field Settings

All fields come with a standard set of basic settings:

<table><thead><tr><th width="232">Option</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td>Name*</td><td>This setting is mandatory. It determines the property name used for storing and retrieving data from the database. It should be a unique identifier for each field and in camel case.</td><td></td></tr><tr><td>Label*</td><td>This is the text used as a field label when you're editing the field inside Strife. It provides a human-readable name for the field.</td><td></td></tr><tr><td>Tooltip<br></td><td>This setting allows you to provide additional information or hints about the field. Tooltips are displayed when users hover over or focus on the field.</td><td></td></tr><tr><td>Autofocus</td><td>Autofocus can be enabled to make the field automatically selected or focused when editing, streamlining the user experience.</td><td></td></tr><tr><td>Validation text</td><td>You can define custom validation text here to provide guidance or error messages when users input data that doesn't meet specific criteria.</td><td></td></tr><tr><td>Tab Group</td><td>Groups fields under a specific tab in the editor</td><td></td></tr><tr><td>Localizable</td><td>Enabling this settings allows the field to be localizable</td><td></td></tr><tr><td>Tab group</td><td>When your template includes a Tab Group, use this setting to determine which tab the field should appear under in the editor. See <a href="https://strife.app/docs/reference/fields/tab-group.md">this page</a> for more info.</td><td></td></tr></tbody></table>

Each field, depending on its type, may offer additional settings to further customize its behavior. For specifics on these additional settings, please refer to the documentation for each respective field.

### JSON Definition

When templates are defined using JSON, the basic field settings form the foundation of each field's configuration within the `editors` array. These settings control how fields behave and appear inside Strife Studio. For additional information on defining templates with JSON, [refer to this page](https://strife.app/docs/reference/templates/defining-templates-with-json.md).

Each field in the `editors` array follows this structure:

```json
{
  "label": "...",              // Label
  "description": "...",        // Tooltip
  "editor": {
    "name": "...",             // Field component name*
    "type": "...",             // Field component type*
    "propertyName": "...",     // Name
    "attributes": {
      "autofocus": true,       // Autofocus
      "validationText": "...", // Validation text
      "tabGroup": "...",       // Tab Group
      ...
    }
  },
  "localizable": true          // Localizable
}

```

> [!NOTE]
> \*Refer to each field’s documentation for component name, type and additional attributes.

### Live Preview Integration for Fields

Fields will automatically transmit their current state to the live preview while a user is editing a field. To enable live preview integration, the website's markup must be upgraded to incorporate Strife view components. You can find detailed instructions on how to set up the live preview [here](https://strife.app/docs/reference/live-preview.md). Please refer to the documentation for each respective field to learn about the view components compatible with that specific field.
