Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 1.33 KB

README.md

File metadata and controls

38 lines (27 loc) · 1.33 KB

@opentiny/genui-sdk-react

A React renderer for the GenUI schema protocol. Stream AI-generated structured output into interactive UI with materials injection.

Learn more about GenUI SDK.

Usage

Install together with core and the React materials package (the base schema renderer is bundled in this package):

pnpm add @opentiny/genui-sdk-react @opentiny/genui-sdk-core @opentiny/genui-sdk-materials-react-antd antd
import { GenuiConfigProvider, GenuiRenderer } from '@opentiny/genui-sdk-react';
import { materials } from '@opentiny/genui-sdk-materials-react-antd/materials';
import 'antd/dist/reset.css';

export function App({ schema }: { schema: unknown }) {
  return (
    <GenuiConfigProvider materials={materials}>
      <GenuiRenderer content={schema} isJsonComplete />
    </GenuiConfigProvider>
  );
}

Documentation

API