floating.tsx

src/components/ai-chat/floating.tsx
'use client'
import { usePathname } from 'next/navigation'
import AiChat from '@/components/ai-chat'
// Global floating AI chat button, anchored bottom-right on every page.
// Positioning/z-index live on the button itself (inside AiChat) so the always
// visible button can sit below other floating clusters while the AI panel it
// opens still layers above them.
//
// The block preview route renders isolated blocks for demo/screenshot use, so
// the chat is omitted there.
export default function FloatingAiChat() {
const pathname = usePathname()
if (pathname === '/block' || pathname?.startsWith('/block/')) return null
return <AiChat />
}

Support

Talk to the developers of this project to learn more

We have been building professional websites for big clients for over 15 years. Gallop templates and blocks is our best foundation for SEO websites and web apps.

© 2026 Web Plant Media, LLC