Skip to content
Talk to an engineer

Customize & configure

Dark mode

Supply theme overrides and a dedicated logo that apply when the agent renders in dark mode. Pass a darkModeSettings object to setConfiguration.

Light mode vs dark mode agent comparison Light theme Acme Assistant Ask me anything... logoUrl (light) darkModeSettings Dark theme Acme Assistant Ask me anything... darkLogoUrl

To override individual component styles instead of the whole theme, see Style Overrides.

URL of the logo shown when dark mode is active. Use it to keep branding legible against a dark background.

Type: string
Default value: ""

Theme overrides applied in dark mode. Its structure mirrors the standard Theme settings, so you control colors and styles in the dark appearance.

Type: object
Default value: {}

flowchart TD
  T["Theme settings<br/>primaryColor, fontFamily, ..."] --> L["Light mode"]
  DT["darkModeSettings.darkTheme<br/>overrides same keys"] --> D["Dark mode"]
  T -.->|"inherits unset keys"| D
  DL["darkLogoUrl"] --> D
  style L fill:#ffffff,stroke:#e2e4ea,color:#0a0e1a
  style D fill:#0a0e1a,stroke:#1d2336,color:#e2e4ea
foldspace.agent('YOUR-AGENT-KEY').setConfiguration({
// Dark mode settings
darkModeSettings: {
darkTheme: {
primaryColor: "#3B82F6",
primaryFontColor: "#FFFFFF",
backgroundColor: "#0F1724",
fontFamily: "Roboto",
fontSize: 14,
secondaryFontColor: "#9CA3AF",
secondaryColor: "#111827",
borderColor: "#1F2937"
},
darkLogoUrl: "https://assets.foldspace.com/logos/foldspace-logo-dark.svg"
}
});

An action’s UI component receives the panel’s mode and colors as theme, and its root carries data-fs-mode and the --fs-* CSS variables. A mode change repaints: the card isn’t run again and nothing is sent to the agent.

card.css
.my-card {
color-scheme: var(--fs-color-scheme);
background: var(--fs-paper);
color: var(--fs-text);
border: 1px solid var(--fs-border);
}
[data-fs-mode="dark"] .my-card {
box-shadow: none;
}

The colors come from darkTheme. If it isn’t configured, they don’t change with the mode, same as the panel, so a card relying on the variables stays light. Set darkModeSettings.darkTheme, or branch on theme.mode in the card.

For every field, where to put color-scheme in each render mode, and full examples, see Support dark mode. To switch the mode at runtime, use setThemeMode.