# @birchui/react API reference

> React components for Birch UI

```bash
npm install @birchui/react
```

## @birchui/react

### createReactComponent

Kind: function. Import from `@birchui/react`.

```ts
function createReactComponent<TOptions, TEvents extends object, TWidget extends Widget<TOptions, TEvents>>(definition: WidgetDefinition<TOptions, TEvents, TWidget>): BirchComponent<TOptions, TEvents, TWidget>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `definition` | `WidgetDefinition<TOptions, TEvents, TWidget>` |  |

### BirchGrid

Kind: const. Import from `@birchui/react`.

```ts
const BirchGrid: BirchGridComponent
```

### BirchGridComponent

Kind: interface. Import from `@birchui/react`.

```ts
interface BirchGridComponent
<TRow = RowData>(props: BirchGridProps<TRow>): ReactNode
```

| Property | Type | Description |
| --- | --- | --- |
| `displayName?` | `string` |  |

### BirchComponent

Kind: type. Import from `@birchui/react`.

```ts
type BirchComponent<TOptions, TEvents extends object, TWidget> = ForwardRefExoticComponent<
  PropsWithoutRef<BirchComponentProps<TOptions, TEvents>> & RefAttributes<TWidget>
>;
```

### BirchComponentProps

Kind: type. Import from `@birchui/react`.

```ts
type BirchComponentProps<TOptions, TEvents extends object> = TOptions &
  EventHandlerProps<TEvents> & {
    className?: string;
    style?: CSSProperties;
    id?: string;
  };
```

### BirchGridProps

Kind: type. Import from `@birchui/react`.

```ts
type BirchGridProps<TRow = RowData> = BirchComponentProps<GridOptions<TRow>, GridEvents<TRow>> &
  RefAttributes<GridApi<TRow>>;
```

### EventHandlerProps

Kind: type. Import from `@birchui/react`.

```ts
type EventHandlerProps<TEvents extends object> = {
  [K in keyof TEvents & string as `on${Capitalize<K>}`]?: (payload: TEvents[K]) => void;
};
```

## @birchui/react/document

### BirchDocumentEditor

Kind: const. Import from `@birchui/react/document`.

```ts
const BirchDocumentEditor: BirchComponent<DocumentEditorOptions, DocumentEditorEvents, DocumentEditorApi>
```

## @birchui/react/pdf

### BirchPdfViewer

Kind: const. Import from `@birchui/react/pdf`.

```ts
const BirchPdfViewer: BirchComponent<PdfViewerOptions, PdfViewerEvents, PdfViewerApi>
```

## @birchui/react/scheduler

### BirchScheduler

Kind: const. Import from `@birchui/react/scheduler`.

```ts
const BirchScheduler: BirchComponent<SchedulerOptions<SchedulerEvent, SchedulerResource>, SchedulerEvents<SchedulerEvent, SchedulerResource>, SchedulerApi<SchedulerEvent, SchedulerResource>>
```
