> 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: getDataDefinitions()

## Article: getDataDefinitions()

## Article Link: https://dev.wix.com/docs/sdk/host-modules/editor/react-elements/data/get-data-definitions.md

## Article Content:

<!-- Source: packages/public-editor-platform-sdk/src/element/index.ts in wix-private/editor-platform -->
# getDataDefinitions()

Retrieves the data field definitions declared in the selected component's manifest.

Each key in the result is a valid `dataItemKey` for [`getData()`](https://dev.wix.com/docs/sdk/host-modules/editor/react-elements/data/get-data.md), [`setData()`](https://dev.wix.com/docs/sdk/host-modules/editor/react-elements/data/set-data.md), and [`getResolvedData()`](https://dev.wix.com/docs/sdk/host-modules/editor/react-elements/data/get-resolved-data.md).

## Syntax

```ts
function getDataDefinitions(): Promise<ElementDataDefinitions>
```

## Returns

`Promise<ElementDataDefinitions>`

An object mapping each data field's key to its definition. Each definition can include:

| Property | Type | Description |
| :---- | :---- | :---- |
| `dataType` | string | The data type declared in the manifest, such as `'text'`, `'image'`, or `'booleanValue'`. |
| `displayName` | string | The label for the field in auto panels. |
| `defaultValue` | any | The default value declared in the manifest for this field. |

## Example

```js
import { reactElements } from '@wix/editor';

const definitions = await reactElements.getDataDefinitions();
```

## See also

- [getData()](https://dev.wix.com/docs/sdk/host-modules/editor/react-elements/data/get-data.md)
- [setData()](https://dev.wix.com/docs/sdk/host-modules/editor/react-elements/data/set-data.md)
- [getResolvedData()](https://dev.wix.com/docs/sdk/host-modules/editor/react-elements/data/get-resolved-data.md)
- [About the React Elements API](https://dev.wix.com/docs/sdk/host-modules/editor/react-elements/introduction.md)