> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# Function: defineComponent()

> **defineComponent**\<`T` _extends_ `$ZodObject`\<`Readonly`\<`Readonly`\<\{\[`k`: `string`]: `$ZodType`\<`unknown`, `unknown`, `$ZodTypeInternals`\<`unknown`, `unknown`>>; }>>, `$ZodObjectConfig`>>(`config`: `object`): [`DefinedComponent`](/next/api/genui/openui/core/type-aliases/DefinedComponent.md)\<`T`>

Define a ReactLynx component renderer and its OpenUI schema metadata.

## Type Parameters

| Type Parameter                                                                                                                                                                  |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `T` _extends_ `$ZodObject`\<`Readonly`\<`Readonly`\<\{\[`k`: `string`]: `$ZodType`\<`unknown`, `unknown`, `$ZodTypeInternals`\<`unknown`, `unknown`>>; }>>, `$ZodObjectConfig`> |

## Parameters

| Parameter            | Type                                                                                                                                                                              |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `config`             | \{ `component`: [`ComponentRenderer`](/next/api/genui/openui/core/type-aliases/ComponentRenderer.md)\<`output`\<`T`>>; `description`: `string`; `name`: `string`; `props`: `T`; } |
| `config.component`   | [`ComponentRenderer`](/next/api/genui/openui/core/type-aliases/ComponentRenderer.md)\<`output`\<`T`>>                                                                             |
| `config.description` | `string`                                                                                                                                                                          |
| `config.name`        | `string`                                                                                                                                                                          |
| `config.props`       | `T`                                                                                                                                                                               |

## Returns

[`DefinedComponent`](/next/api/genui/openui/core/type-aliases/DefinedComponent.md)\<`T`>
