You can find the complete source code for this guide in the c1-custom-components example repository.
C1Chat component and plugging in your own components where needed. Follow these steps to get started:
Destructure the C1Chat component
If you’ve followed the Quickstart guide, you should have a Here is an illustration of the composed UI that shows which components refer to which parts of the UI:
C1Chat component in your page.tsx file. You will need to replace that component with its constituent components.First, import ThemeProvider from @thesysai/genui-sdk, ChatProvider from @crayonai/react-core, and the following components from @crayonai/react-ui/Shell. Then, use them in your JSX code as follows:
Build your own custom component
Next, build the custom component you would like to plug into the UI. For this example, let’s assume you want to replace the composer with a custom one. You can write the custom composer as follows: