# EntityPage.Slots

**Category:** Base Components/Pages/Entity Page

## Examples

### Basic

This example renders plugin widgets in the entity page slot by passing a `componentId` from Dev Center to `EntityPage.Slots`. Learn more about [Slots and Plugins](./?path=/story/features-enrich-slots-and-plugins--slots-and-plugins).

```tsx
import React from 'react';
import { EntityPage, EntityPageState, useEntityPage } from '@wix/patterns';
import { useForm } from '@wix/patterns/form';

interface MyEntity {
  id: string;
  name?: string;
  createdDate: Date;
  updatedDate: Date;
}

function Basic() {
  const form = useForm();
  const state: EntityPageState<MyEntity> = useEntityPage<MyEntity>({
    parentPageId: '',
    form,
    onSave: () =>
      Promise.resolve({
        updatedEntity: {
          ...state.entity,
        } as MyEntity,
      }),
    saveErrorToast: (e) => 'Failed to save',
    fetch: () =>
      Promise.resolve({
        entity: {
          id: 'id',
          name: 'name',
          createdDate: new window.Date(),
          updatedDate: new window.Date(),
        },
      }),
  });

  return (
    <EntityPage state={state}>
      <EntityPage.Header title={{ text: 'Entity Name' }} />
      <EntityPage.Content>
        <EntityPage.MainContent>
          <EntityPage.Slots containerId="cd910877-1bb2-445e-822a-aa04a342c2f5" />
        </EntityPage.MainContent>
      </EntityPage.Content>
    </EntityPage>
  );
}
```

## API

### Overview

A slot container for rendering TPA plugin widgets inside an [`EntityPage`](./?path=/story/base-components-pages-entity-page--entitypage). Pass a `containerId` from your Dev Center app to render third-party plugins in the entity page layout. Learn more about [Slots and Plugins](./?path=/story/features-enrich-slots-and-plugins--slots-and-plugins).

```tsx
import { EntityPage } from '@wix/patterns/page';
```

### Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `containerId` | `string` | Yes | - | An id of the container defined in the installed on a site application that contains TPA's actions. |
| `dataHook` | `string` | No | - | Applies a data-hook HTML attribute that can be used in tests. |

