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

  1. Go to Website Embed (find it in the sidebar under Double AI Twin)
  2. Choose an embed mode: Chat Bubble, Inline, or Modern Bar
  3. Select React as the method
  4. Copy the generated component code

How to add it to a React project

  1. Paste the component into the relevant file (e.g. layout.tsx or a specific page)
  2. Import any required dependencies shown in the snippet
  3. Run the project locally to test
  4. 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