Theming
Match the connect window to your design system with the CSS tokens of @aiconnect/design, in light and dark, and in right to left languages.
The connect window of @aiconnect/react reads its colors, font, radius and width from CSS custom properties named --aic-*. They come from @aiconnect/design, and @aiconnect/react/styles.css includes them. You theme the window by setting these properties in your own stylesheet.
Set your tokens
Write the tokens you want to change on :root, in a stylesheet loaded after @aiconnect/react/styles.css. When both rules have the same specificity, the later one wins.
import '@aiconnect/react/styles.css';
import './aiConnectTheme.css';Taamtaam's theme sets its font and its warm palette:
/* The AI Wallet connect window in TaamTaam's palette. */
:root {
--aic-font: var(--font-montserrat), sans-serif;
--aic-ink: #2f2b22;
--aic-muted: #5c5544;
--aic-surface: #ffffff;
--aic-ground: #f7f5f0;
--aic-border: #e2ddd1;
--aic-accent: #6f6754;
--aic-accent-ink: #ffffff;
--aic-danger: #b3261e;
}You can also set the tokens on any element that wraps the provider, to theme one part of the page.
The tokens
| Token | Light | Dark | What it styles |
|---|---|---|---|
--aic-font | inherit | inherit | The font of the whole window. |
--aic-ink | #0b0d12 | #f3f4f6 | Titles, body text and the help link. |
--aic-muted | #5e636d | #9aa0aa | Hints, the help screen's list and the close button. |
--aic-surface | #ffffff | #17181d | The card's background. |
--aic-ground | #f6f7f9 | #0e0f13 | The close button's background. |
--aic-border | #e6e8ec | #2a2c33 | The card's border and the help link's underline. |
--aic-accent | #0b0d12 | #f3f4f6 | The main button's background. |
--aic-accent-ink | #ffffff | #0e0f13 | The main button's text. |
--aic-cyan | #0ab9f7 | #0ab9f7 | The wallet mark in the disc, the inner arcs and the disc's border while the wallet waits for the visitor. |
--aic-cyan-soft | #7fddfb | #7fddfb | The disc's border at rest and the middle arcs while the wallet waits. |
--aic-cyan-faint | #cff4fc | #0f3a49 | The arcs at rest. |
--aic-halo | #e3f8fd | #0c2a35 | The halo around the disc. |
--aic-focus | #0ab9f7 | #0ab9f7 | The focus ring of buttons and links. |
--aic-backdrop | rgba(11, 13, 18, 0.42) | rgba(0, 0, 0, 0.6) | The layer behind the card, which also blurs the page. |
--aic-shadow | 0 24px 64px rgba(11, 13, 18, 0.2) | 0 24px 64px rgba(0, 0, 0, 0.55) | The card's shadow. |
--aic-radius | 24px | 24px | The card's corner radius. |
--aic-width | 380px | 380px | The card's width, capped to the viewport. |
--aic-danger | #c4321f | #ff8a7a | Part of the token set. The connect window's styles do not read it in this release. |
The cyan tokens draw AI Wallet's mark in its ring, the same mark the wallet itself shows. The disc at the center of the ring keeps a white background in both palettes.
Dark mode
The light palette applies by default. An element with data-aic-theme="dark" gives the window under it the dark palette, and data-aic-theme="auto" follows the system setting.
The connect window renders inside AiConnectProvider, right after its children. Put the attribute on an element that contains the provider, such as <html>:
<html lang="en" data-aic-theme="auto">When your site has its own dark mode switch, set the attribute from it, or skip the attribute and write the dark values under your own dark selector:
:root {
--aic-ink: #2f2b22;
--aic-surface: #ffffff;
--aic-accent: #6f6754;
}
/* The site puts class="dark" on <html> in dark mode. */
.dark {
--aic-ink: #f1ede4;
--aic-surface: #1d1b17;
--aic-accent: #d8cfba;
color-scheme: dark;
}Right to left
The window's reading direction comes from the dir field of its messages. The built in Hebrew messages set dir: 'rtl':
<AiConnectProvider client={client} locale="he">The provider puts dir on the window's outer element, so the layout mirrors and the help screen's list indents from the right. When you pass your own messages, set dir to match their language. Pick a --aic-font with Hebrew glyphs, or keep inherit when your page font has them.
Motion
The window fades in, the card rises, and the arcs pulse while the wallet waits for the visitor. Under prefers-reduced-motion: reduce these animations are off.
Expose your tools over MCP
Serve your site's tools as an MCP server, let the visitor's model call them through the tool loop or the AI SDK you already use, and design them so the model finds what the visitor asked for.
@aiconnect/core
Every public export of @aiconnect/core, the site's connection to the visitor's AI, the fetch for AI SDKs, the tool loop and the MCP tool source, with its types generated from the source and an example.