Themes

Navieo's chat widget supports full theme customization. Choose between built-in dark and light presets, or pass custom color variables to match your app's design system.

Quick Start

Pass the theme prop to NavieoNextProvider (or NavieoProvider):

import { NavieoNextProvider } from "@navieo/react/next";

// Light theme (default — no prop needed)
<NavieoNextProvider>
  {children}
</NavieoNextProvider>

// Dark theme
<NavieoNextProvider theme="dark">
  {children}
</NavieoNextProvider>

Custom Themes

Pass an object with a base preset and custom variables to override specific colors:

<NavieoNextProvider
  theme={{
    base: "dark",
    variables: {
      primary: "#6366f1",
      userBubble: "#6366f1",
      userBubbleText: "#ffffff",
      borderRadius: "12px",
    },
  }}
>
  {children}
</NavieoNextProvider>

Any variable you don't override inherits from the base preset ("dark" by default).

Available Variables

VariableDescriptionDark DefaultLight Default
backgroundWidget background#09090b#ffffff
foregroundPrimary text color#fafafa#09090b
mutedForegroundSecondary/muted text#a1a1aa#71717a
borderBorder colorrgba(255,255,255,0.10)rgba(0,0,0,0.08)
borderHoverBorder hover/focusrgba(255,255,255,0.20)rgba(0,0,0,0.16)
surfaceCards, input area, assistant bubblesrgba(255,255,255,0.05)rgba(0,0,0,0.03)
userBubbleUser message background#fafafa#09090b
userBubbleTextUser message text#09090b#fafafa
assistantBubbleAssistant message backgroundrgba(255,255,255,0.06)rgba(0,0,0,0.04)
assistantBubbleTextAssistant message text#d4d4d8#3f3f46
primaryAccent color for highlights#fafafa#09090b
buttonBackgroundFloating button background#09090b#ffffff
buttonForegroundFloating button icon#fafafa#09090b
buttonBorderFloating button borderrgba(255,255,255,0.12)rgba(0,0,0,0.10)
borderRadiusWidget border radius16px16px
fontFamilyFont stackSystem sans-serifSystem sans-serif

Using Preset Exports

You can also import the preset objects directly for programmatic access:

import { darkTheme, lightTheme } from "@navieo/react";

console.log(darkTheme.background); // "#09090b"
console.log(lightTheme.foreground); // "#09090b"

Brand Example

Match the widget to your brand colors:

<NavieoNextProvider
  theme={{
    base: "dark",
    variables: {
      background: "#0f172a",
      foreground: "#f8fafc",
      mutedForeground: "#94a3b8",
      surface: "rgba(148, 163, 184, 0.08)",
      border: "rgba(148, 163, 184, 0.12)",
      borderHover: "rgba(148, 163, 184, 0.24)",
      userBubble: "#3b82f6",
      userBubbleText: "#ffffff",
      assistantBubble: "rgba(148, 163, 184, 0.1)",
      assistantBubbleText: "#cbd5e1",
      buttonBackground: "#3b82f6",
      buttonForeground: "#ffffff",
      buttonBorder: "rgba(59, 130, 246, 0.3)",
    },
  }}
>
  {children}
</NavieoNextProvider>

TypeScript

All theme types are fully exported:

import type {
  NavieoTheme,
  NavieoThemeVariables,
  NavieoResolvedTheme,
} from "@navieo/react";
  • NavieoTheme — the input type accepted by the theme prop
  • NavieoThemeVariables — partial object for custom overrides
  • NavieoResolvedTheme — fully resolved theme with all values filled