For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/genui/openui/chat/functions/createOpenUiChatLibrary.md.
Lynx
  • English
  • Function: createOpenUiChatLibrary()

    createOpenUiChatLibrary(): Library

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

    Returns

    Library

    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

    const library = createOpenUiChatLibrary();
    <OpenUiRenderer library={library} response={'root = Card([TextContent("Hello")])'} />;
    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.