# @wix/editor-react-types

TypeScript types for [Editor React Component](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/site-extensions/editor-react-components/about-editor-react-components) props.

## Installation

```bash
npm install @wix/editor-react-types
```

## Usage

Import the types you need and use them to type your component's props:

```tsx
import type { Image, Link, Wix } from '@wix/editor-react-types';

interface MyComponentProps {
  className: string;
  image?: Image;
  link?: Link;
  wix?: Wix;
}
```

## Available types

| Type | Description |
|------|-------------|
| `Image` | An image from Wix Media. |
| `Video` | A video from Wix Media. |
| `Audio` | An audio track from Wix Media. |
| `BuilderAudio` | An audio track with metadata and multiple quality sources. |
| `Link` | A navigation link. |
| `VectorArt` | An SVG vector art asset from Wix Media. |
| `MenuItems` | A list of navigation menu items. |
| `A11y` | Accessibility attributes. |
| `Wix` | Wix framework props. |
| `RichText` | Rich text content. |
| `Direction` | Text direction. |
| `Text`, `NumberType`, `BooleanValue` | Primitive data types. |
| `WebUrl`, `Email`, `Phone`, `Hostname` | Validated string formats. |
| `LocalDate`, `LocalTime`, `LocalDateTime` | ISO-8601 date and time strings. |
| `Guid`, `Regex`, `Schema` | Additional primitive types. |

For full documentation on each type and how to use them in your component, see the [Props Reference](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/site-extensions/editor-react-components/props).
