> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Data Reference

## Article: Data Reference

## Article Link: https://dev.wix.com/docs/site-extensions/context-providers/data-reference.md

## Article Content:

# Data Reference

The `data` section of a context provider manifest declares configuration inputs. In Studio Two, a Wix user sets these inputs when configuring a **Data Source**, and the values arrive on the provider component as React props.

## Example

The following `data` section defines 2 inputs for a team context:

```ts
data: {
  showInactive: {
    dataType: 'booleanValue',
    displayName: 'Include Inactive Teammates',
    defaultValue: false,
  },
  pageSize: {
    dataType: 'number',
    displayName: 'Teammates Per Page',
    defaultValue: 12,
  },
}
```

## Data item fields

A data item supports the following fields:

| Field | Required | Description |
| --- | --- | --- |
| `dataType` | Yes | [Type](https://dev.wix.com/docs/site-extensions/context-providers/context-provider-data-types.md) of value the input accepts. |
| `displayName` | No | Input name shown in the editor. |
| `defaultValue` | No | Initial editor value. It must match the runtime prop shape. |
| `disableDeletion` | No | Whether a Wix user can clear the input in the editor. |
| `arrayItems` | When `dataType` is `arrayItems` | Definition for each element in an [array](#arrays). |
| `data` | When `dataType` is `data` | Fields in a [nested object](#nested-objects). |
| `textEnum` | When `dataType` is `textEnum` | Allowed [string options](#text-enums). |

## Empty data

If the provider doesn't need configuration, set `data` to an empty object. The provider component still runs, and the editor doesn't show configuration fields.

```ts
data: {}
```

## Arrays

For an array, set `dataType` to `arrayItems` and define each element under `arrayItems.dataItem`:

```ts
data: {
  pinnedTeammateIds: {
    dataType: 'arrayItems',
    displayName: 'Pinned Teammates',
    arrayItems: {
      dataItem: {
        dataType: 'text',
        displayName: 'Teammate ID',
      },
    },
  },
}
```

<blockquote class="warning">

**Warning:** Arrays in `data` use `arrayItems.dataItem`. Arrays in `context` use `arrayItems.item`.

</blockquote>

## Nested objects

For a nested object, set `dataType` to `data` and define its fields under `data.items`:

```ts
data: {
  defaultFilter: {
    dataType: 'data',
    displayName: 'Default Filter',
    data: {
      items: {
        department: {
          dataType: 'text',
          displayName: 'Department',
        },
        location: {
          dataType: 'text',
          displayName: 'Location',
        },
      },
    },
  },
}
```

## Text enums

For a fixed set of strings, set `dataType` to `textEnum` and list the choices under `textEnum.options`:

```ts
data: {
  sortOrder: {
    dataType: 'textEnum',
    displayName: 'Sort Order',
    defaultValue: 'name_asc',
    textEnum: {
      options: [
        { value: 'name_asc', displayName: 'Name: A to Z' },
        { value: 'name_desc', displayName: 'Name: Z to A' },
      ],
    },
  },
}
```

## See also

- [About the Context Provider Manifest](https://dev.wix.com/docs/site-extensions/context-providers/about-the-context-provider-manifest.md)
- [Context Reference](https://dev.wix.com/docs/site-extensions/context-providers/context-reference.md)
- [Context Provider Resources Reference](https://dev.wix.com/docs/site-extensions/context-providers/context-provider-resources-reference.md)