Skip to content
WebMCP Agents
Esc
↑↓navigate↵open⌘Jpreview
On this page

defineChatTheme

A chat theme, typed where it is written: the identity function, for autocomplete and a type check.

Returns the theme it is given, typed as a ChatThemeInput. Use it where you write a theme outside the JSX, so the editor completes its keys and a typo is a type error.

Import

import { defineChatTheme } from "@webmcp-agents/chat";

Example

export const theme = defineChatTheme({
  light: { color: { accent: "#0f62fe", bg: "#ffffff" } },
  dark: { color: { accent: "#78a9ff", bg: "#161616" } },
});

Options

defineChatTheme(theme).

Name Type Default Description
theme ChatThemeInput required One theme, or { light, dark }.

Returns

theme, unchanged, with its literal type.

See also

Was this page helpful?