Docs
Framer Integration Guide
Add Heyo live chat to your Framer website. Perfect for modern, interactive sites and agency projects.
This guide shows you how to add Heyo to your Framer website. Works with all Framer projects and templates.
Installation
Method 1: Using Custom Code Component (Recommended)
- In your Framer project, click the + button to add a new element
- Search for Custom Code component
- Drag it onto your page (or add it to a layout/component)
- In the code editor, select HTML and paste:
<script src="https://heyo.so/embed/script" defer data-project-id="YOUR_PROJECT_ID"></script>
- Position the component anywhere (it won't be visible, but the chat will work)
- Publish your site
Method 2: Site-Wide Custom Code
For site-wide integration:
- Go to Settings (gear icon in top-left)
- Click General
- Scroll to Custom Code
- Add to the End of section:
<script src="https://heyo.so/embed/script" defer data-project-id="YOUR_PROJECT_ID"></script>
- Click Save and publish
The Custom Code feature is available on Framer's paid plans.
Advanced Integration
Custom Chat Button
Create a beautiful custom button in Framer to trigger the chat:
- Design your button in Framer
- Add a Code Component for the interaction:
import { useEffect } from "react"
export default function ChatButton() {
const openChat = () => {
if (window.HEYO) {
window.HEYO.show()
}
}
return (
<button
onClick={openChat}
style={{
padding: "12px 24px",
background: "#6366f1",
color: "white",
border: "none",
borderRadius: "8px",
cursor: "pointer",
fontSize: "16px",
}}
>
Chat with us
</button>
)
}
Or use Framer's interactive capabilities:
<!-- Add to a Custom Code component -->
<script>
function openHeyoChat() {
window.HEYO?.show();
}
</script>
<button onclick="openHeyoChat()" style="padding: 12px 24px; background: #6366f1; color: white; border: none; border-radius: 8px; cursor: pointer;">
Need help?
</button>
Hide Default Widget
If using a custom trigger, hide the default Heyo button:
<style>
#heyo-widget-button {
display: none !important;
}
</style>
Route-Specific Display
Show/hide chat on specific pages:
// Code Component
import { useEffect } from "react"
import { useRouter } from "framer"
export default function HeyoControl() {
const router = useRouter()
useEffect(() => {
// Hide on pricing page
if (router.pathname === "/pricing") {
window.HEYO?.hide()
} else {
window.HEYO?.show()
}
}, [router.pathname])
return null
}
Framer CMS Integration
Pass CMS data to your chat widget:
// Code Component for CMS pages
export default function CMSHeyo({ title, author }) {
useEffect(() => {
if (window.HEYO) {
window.HEYO.trackEvent("viewing_content", {
title: title,
author: author,
})
}
}, [title, author])
return null
}
Integration with Framer Motion
Heyo works seamlessly with Framer Motion animations. No conflicts!
Example of animating your custom chat button:
import { motion } from "framer-motion"
export default function AnimatedChatButton() {
return (
<motion.button
onClick={() => window.HEYO?.show()}
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
style={{
padding: "12px 24px",
background: "#6366f1",
color: "white",
border: "none",
borderRadius: "8px",
cursor: "pointer",
}}
>
Chat with us
</motion.button>
)
}
Pass User Data
For authenticated Framer sites, pass user context:
// Code Component
import { useEffect } from "react"
export default function HeyoWithUser({ userName, userEmail }) {
useEffect(() => {
if (window.HEYO) {
window.HEYO.init({
projectId: "YOUR_PROJECT_ID",
user: {
name: userName,
email: userEmail,
},
})
}
}, [userName, userEmail])
return null
}
Responsive Behavior
Control widget visibility on different screen sizes:
<!-- Custom Code Component -->
<style>
@media (max-width: 768px) {
#heyo-widget-button {
bottom: 20px;
right: 20px;
}
}
</style>
Agency & Client Projects
Multi-Client Setup
For agencies:
- Create separate Heyo projects for each client
- Use different Project IDs in each Framer site
- Share inbox access with clients
Templates
If you're creating Framer templates:
- Add Heyo with a placeholder Project ID
- Document for users how to replace with their own ID
- Consider offering Heyo setup as a premium feature
Best Practices
- Use custom code components for better control
- Leverage Framer's component system for reusability
- Test interactive states (hover, click) with custom buttons
- Make sure chat button has good contrast on all backgrounds
- Position widget to not interfere with Framer animations
Troubleshooting
Widget not showing
- Verify you're on a paid Framer plan with Custom Code access
- Check that Project ID is correct
- Ensure custom code component is on published site
- Clear browser cache
TypeScript errors in Code Components
Add type definitions:
declare global {
interface Window {
HEYO: {
show: () => void
hide: () => void
toggle: () => void
init: (config: any) => void
}
}
}
Conflicts with Framer interactions
- Heyo shouldn't conflict with Framer interactions
- If issues occur, adjust z-index in custom styles
Not persisting across pages
- Make sure the Heyo script is in site-wide custom code
- Or add the Custom Code component to your layout/master component