> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useinvent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Framer

> Add your Invent assistant to Framer sites

## Overview

Add your Invent AI assistant to any Framer site with a floating bubble. Perfect for modern, interactive websites built with Framer.

## Installation

<Steps>
  <Step title="Open Your Framer Project">
    Open your Framer project in the Framer editor.
  </Step>

  <Step title="Go to Site Settings">
    Click on the **Settings** icon in the top toolbar, then select **General**.
  </Step>

  <Step title="Add Custom Code">
    Scroll down to **Custom Code** section and find **End of \<body> tag**.
  </Step>

  <Step title="Paste the Code">
    Add this code:

    ```html theme={"system"}
    <invent-assistant assistant-id="YOUR_ASSISTANT_ID" />
    <script type="text/javascript" src="https://www.useinvent.com/embed.js" async defer></script>
    ```

    Replace `YOUR_ASSISTANT_ID` with your actual assistant ID from the Invent dashboard.
  </Step>

  <Step title="Publish Your Site">
    Click **Publish** and your assistant will appear on all pages.
  </Step>
</Steps>

## Customization

### Match Your Framer Design

```html theme={"system"}
<invent-assistant
  assistant-id="YOUR_ASSISTANT_ID"
  theme-appearance="dark"
  theme-button-background-color="#0099FF"
  theme-button-color="#FFFFFF"
/>
<script type="text/javascript" src="https://www.useinvent.com/embed.js" async defer></script>
```

### Show Only on Specific Pages

For page-specific installation in Framer:

1. Select the specific page in your Framer project
2. Click **Page Settings** (gear icon)
3. Scroll to **Custom Code**
4. Add the code to that page only

## Framer Components

You can also add the assistant to specific components:

1. Create a **Code Component** in Framer
2. Add the embed code inside
3. Place the component wherever you want

```jsx theme={"system"}
export default function InventAssistant() {
  return (
    <>
      <invent-assistant assistant-id="YOUR_ASSISTANT_ID" />
      <script type="text/javascript" src="https://www.useinvent.com/embed.js" async defer></script>
    </>
  )
}
```

## User Authentication

<Warning>
  **Security Requirement:** When using any `user-*` attributes (`user-id`, `user-name`, `user-avatar`), you **must** also provide `user-hash`. Both `user-id` and `user-hash` must be provided together, or neither should be provided. The `user-hash` must be generated on your backend using HMAC-SHA256 with your assistant's secret key. Never expose the secret key to the client.
</Warning>

Pass user data if you have a membership or login system. See the [Widget Authentication](/assistants/widget#user-authentication-optional) guide for complete authentication details.

```html theme={"system"}
<invent-assistant
  assistant-id="YOUR_ASSISTANT_ID"
  user-id="USER_ID"
  user-name="USER_NAME"
  user-hash="GENERATED_HASH"
/>
<script type="text/javascript" src="https://www.useinvent.com/embed.js" async defer></script>
```

## Tips for Framer

<CardGroup cols={2}>
  <Card title="Animations" icon="wand-magic-sparkles">
    The bubble works seamlessly with Framer animations
  </Card>

  <Card title="Responsive" icon="mobile">
    Automatically adapts to mobile layouts
  </Card>

  <Card title="Performance" icon="gauge-high">
    Async loading won't slow down your site
  </Card>

  <Card title="CMS Ready" icon="database">
    Works with Framer CMS pages
  </Card>
</CardGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Bubble not appearing">
    **Solutions:**

    * Verify code is in "End of body tag" section
    * Check assistant ID is correct
    * Clear browser cache and reload
    * Check browser console for errors
  </Accordion>

  <Accordion title="Conflicts with Framer interactions">
    **Solutions:**

    * Check z-index if bubble is hidden behind elements
    * Ensure no other chat widgets are installed
    * Test with interactions temporarily disabled
  </Accordion>
</AccordionGroup>
