> 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: Guid

## Article: Guid

## Article Link: https://dev.wix.com/docs/site-extensions/editor-react-components/editor-react-types/reference/guid.md

## Article Content:

import { Property, PropertyList, ExpandableSection } from "@wix/docs-ui/content";

# Guid

A unique identifier, stored as a string. Use it for a field that references a single record
by its id, such as an item pulled from an external system. The value is a UUID, for example
`'550e8400-e29b-41d4-a716-446655440000'`.

## Component

In your component code, import the `Guid` type from `@wix/editor-react-types`:

```ts
import type { Guid } from '@wix/editor-react-types';
```

At runtime it's a plain string:

```ts
type Guid = string
```

### Usage

Your code either consumes a value of type `Guid` or produces one:

::::tabs
:::Consumers
In a component that receives a `Guid`, use it to look up or key the referenced record:

```tsx
import type { Guid } from '@wix/editor-react-types';

function ItemCard({ itemId }: { itemId?: Guid }) {
  return <article data-item-id={itemId}>...</article>;
}
```
:::
:::Producers
When your code produces a `Guid`, for a context or a function return, assign a generated
UUID:

```ts
import type { Guid } from '@wix/editor-react-types';

const itemId: Guid = crypto.randomUUID();
```
:::
::::

## Manifest

In your manifest, declare the field with the `guid` dataType:

```json
{ "dataType": "guid" }
```

### Declaration

Declare a `guid` field in one of these ways, depending on where the value comes from:

::::tabs
:::Data-property
Declare it as a data property when the Wix user should set the identifier in a panel. It takes
`dataType`, `displayName`, and an optional `defaultValue`:

```json
{
  "itemId": {
    "dataType": "guid",
    "displayName": "Item ID",
    "defaultValue": "550e8400-e29b-41d4-a716-446655440000"
  }
}
```
:::
:::Context-item
Declare it as a context item when your component supplies the identifier to descendant
components. It takes just `dataType` and `displayName`:

```json
{
  "itemId": {
    "dataType": "guid",
    "displayName": "Item ID"
  }
}
```
:::
:::Function-parameter-and-return
Declare it on a function when the function accepts or returns an identifier. It takes
`dataType` and an optional `displayName`, and a parameter may also set `optional`:

```json
{
  "parameters": [
    {
      "dataType": "guid",
      "displayName": "Item ID"
    }
  ],
  "returns": {
    "dataType": "guid"
  }
}
```
:::
::::