Embedding With React
Embedding With React
Embedding with React
Import the AI Double as a React component into any React or Next.js project.
How to get the React embed code
- Go to Website Embed (find it in the sidebar under Double AI Twin)
- Choose an embed mode: Chat Bubble, Inline, or Modern Bar
- Select React as the method
- Copy the generated component code
How to add it to a React project
- Paste the component into the relevant file (e.g. layout.tsx or a specific page)
- Import any required dependencies shown in the snippet
- Run the project locally to test
- Deploy as normal
What to know
- Works with React and Next.js projects
- For Next.js App Router, add to the root layout.tsx for site-wide embedding
- For page-specific embedding, add the component only to that page file
Next steps:
- Embedding with HTML
- Embedding on WordPress, Framer, or Webflow