Skip to Content
kindui

Theming

Match Agent UI and Charts to your app's colors, and switch both to dark mode together.

Agent UI and Charts are themed differently, but both follow your page's color-scheme for dark mode. Set it once and both switch.

Dark Mode

Agent UI's colors are light-dark() pairs, and Charts picks the light or dark side of a series color the same way. To follow the system, set:

:root {
  color-scheme: light dark;
}

If your app switches with a class, like shadcn's .dark, set color-scheme on that class too, so both libraries follow it:

.dark {
  color-scheme: dark;
}

Agent UI

Agent UI's colors are --kind-color-* tokens, like --kind-color-accent, plus --kind-radius. Set them in your own :root or @theme to change them:

:root {
  --kind-color-accent: var(--color-violet-600);
  --kind-radius: 0.5rem;
}

See Agent UI's Get Started for every token.

Charts

Charts read your shadcn theme variables, like --foreground, --border, --muted and --radius, so they match the rest of your app. Set them on a surrounding element to theme one chart. Series colors come from each chart's config; pass { light, dark } to give a series one per color scheme:

import type { SeriesConfig } from "@kind-ui/charts";

const config = {
  orders: { label: "Orders", color: { light: "#3659b8", dark: "#7ec5ff" } },
} satisfies SeriesConfig;

See Charts' Get Started for more.