### Use AI/UI in React Source: https://ui.kitn.ai/guides/introduction Using the React wrapper provided by @kitn.ai/ui/react to handle messages and submission events. ```tsx handleSubmit(e.detail.value)} /> ``` -------------------------------- ### Use kai-chat with messages and kai-submit event Source: https://ui.kitn.ai/guides/introduction.md Basic usage of the kai-chat element: place it in HTML, wait for it to be defined, set the messages property in JavaScript (arrays can't be HTML attributes), and listen for the kai-submit CustomEvent to handle user input. ```html ``` -------------------------------- ### Use kai-chat in Svelte with prop and event Source: https://ui.kitn.ai/guides/introduction.md Svelte usage of the kai-chat component. Pass the messages prop with shorthand {messages} and listen for the kai-submit event with on:kai-submit. ```html ``` -------------------------------- ### Use kai-chat in plain HTML Source: https://ui.kitn.ai/guides/introduction.md Plain HTML usage of the kai-chat component. Wait for the custom element to be defined, set the messages property, and add an event listener for kai-submit. ```html ``` -------------------------------- ### Use kai-chat in React with typed wrapper Source: https://ui.kitn.ai/guides/introduction.md React usage of the kai-chat component via the typed wrapper from @kitn.ai/ui/react. Events become onEventName props, so onSubmit receives the event and you access e.detail.value. ```tsx handleSubmit(e.detail.value)} /> ``` -------------------------------- ### Use kai-chat in Vue with .prop and @kai-submit Source: https://ui.kitn.ai/guides/introduction.md Vue usage of the kai-chat component. Use the .prop modifier to bind the messages property and @kai-submit to listen for the submit event. ```html ``` -------------------------------- ### Use kai-chat in Angular with property and event binding Source: https://ui.kitn.ai/guides/introduction.md Angular usage of the kai-chat component. Bind the messages property with [messages] and handle the kai-submit event with (kai-submit). ```html ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.