For Next.js applications

Add Ask AI to your Next.js app

Add an Ask AI chatbot to your Next.js app. Works with App Router and Pages Router. Readers get source-cited answers from your indexed content, in their language.

14-day freeSelf-serveLive in 15 min
Biel.ai chatbot
Powered by biel.ai
Assistant
Hi! how can I help you?
Suggested questions
enable dark mode
Assistant

To enable dark mode for Biel.ai on your website, follow these steps:

  1. Modify your website’s main HTML file.
  2. Add the attribute data-theme="dark" to the <html> tag.
html
<html data-theme="dark">
  <!-- Your existing HTML content -->
</html>

This change activates the dark mode styling for Biel.ai…

Send
AI-generated answers may contain errors. Verify official sources before use.

Used by teams that take their documentation seriously

GrepTime
ScyllaDB
SecuroSys
Katalon
Talon.one
Tezos
CrazyGames
GrepTime
ScyllaDB
SecuroSys
Katalon
Talon.one
Tezos
CrazyGames
Install

Three ways to ship Biel in Next.js

Wrap the chatbot in a client component, swap in an AI search field, or expose your content via MCP for AI agents. Same SSR-safe pattern across all three.
Full installation guide

SSR-safe wrapper component

The Biel widget is a web component, which the browser registers at runtime, so it has to render client-side only. Wrap it with next/dynamic and ssr: false. Works on App Router and Pages Router alike.
  • Floating Ask AI button on every page
  • App Router and Pages Router both supported
  • SSR-safe via next/dynamic with ssr: false
  • Add 'use client' for App Router boundary
components/biel-button.tsx
'use client'

// 1. npm install biel-react

import { useEffect } from 'react'
import { BielButton } from 'biel-react'
import { defineCustomElements } from 'biel-search/loader'
import 'biel-search/dist/biel-search/biel-search.css'

export default function ChatButton() {
  useEffect(() => { defineCustomElements() }, [])

  return (
    <BielButton
      project="<YOUR_PROJECT_ID>"
      headerTitle="Documentation AI"
      buttonPosition="bottom-right"
      buttonStyle="dark"
    >
      Ask AI
    </BielButton>
  )
}

// 2. In app/layout.tsx, render it dynamically:
//    import dynamic from 'next/dynamic'
//    const ChatButton = dynamic(
//      () => import('@/components/biel-button'),
//      { ssr: false }
//    )

Things teams ask during evaluation

App Router or Pages Router?

Both work. The widget needs to be a client component, which on App Router means a 'use client' directive at the top of the wrapper. On Pages Router, plain client-side components work as usual.

Will it break SSR?

No, but you have to import it dynamically with ssr: false. The widget is a web component that the browser registers at runtime; rendering it on the server would throw. The wrapper pattern handles this cleanly.

Does it work with React Server Components?

Yes. The wrapper is a Client Component, and you import that into your Server Components like any other client boundary. RSC streams the rest of the page; the widget hydrates on the client.

Will it work on Vercel and other Next.js hosts?

Yes. The widget loads from a CDN at runtime; nothing about the deploy target affects it. Vercel, Netlify, AWS Amplify, and custom Node servers are all supported.

Can we customize colors and styling?

Yes. Pass props for color, position, and style, or use CSS custom properties (--biel-primary-color and friends) to override at the theme level. Tailwind, CSS Modules, and styled-components all work.

How long does the install take?

npm install, one wrapper component, one dynamic import. Most teams are live in 15 minutes including indexing.

Where does our content go?

EU-hosted by default. GDPR compliant. Your content is never used to train models.

Make your Next.js app answer questions

14-day free trial · No credit card required · From $50/mo
Use a different platform? See our integration pages for React, Gatsby, Vue, Docusaurus, and MkDocs.
Try me ↓