> 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: createOpenUiChatLibrary()

> **createOpenUiChatLibrary**(): [`Library`](/next/api/genui/openui/core/type-aliases/Library.md)

Create a library for OpenUI Chat responses rooted at Card.
Create once and pass the same instance to OpenUiRenderer across renders.

## Returns

[`Library`](/next/api/genui/openui/core/type-aliases/Library.md)

## Remarks

This factory registers the entire Chat catalog and includes its component styles.
To include only selected components and their styles, import each component from
`@lynx-js/genui/openui/chat/<Component>` and assemble the library with
`createOpenUiLibrary` from `@lynx-js/genui/openui/explicit`.

## Example

```tsx
const library = createOpenUiChatLibrary();
<OpenUiRenderer library={library} response={'root = Card([TextContent("Hello")])'} />;
```
