datui
Color scheme

Theming

All visual values are CSS custom properties prefixed with --dt-. Tailwind utilities such as bg-primary, rounded-lg, h-control-m and text-title-2 read them, so changing a variable restyles every component.

Color scheme

Pass colorScheme to ConfigProvider: "light", "dark" or "system". AppRoot writes the resolved value to data-theme. Use useColorScheme() to read it.

Custom themes

Override variables under any selector. Scoping to an attribute lets several themes coexist:

[data-theme="dark"] .brand,
.brand {
  --dt-primary: #7c3aed;
  --dt-primary-hover: #6d28d9;
  --dt-accent: rgb(124 58 237 / 0.12);
  --dt-accent-foreground: #7c3aed;
  --dt-ring: rgb(124 58 237 / 0.5);
  --dt-radius-md: 10px;
}

Density

AppRoot sets data-density to compact on wide screens with a fine pointer and regular elsewhere. Compact density shrinks control, cell and header heights. Force one with <AppRoot density="regular">.

Token reference

  • Surfaces: background, background-secondary, background-tertiary, card, popover, overlay (each with -foreground where text sits on it)
  • Intent: primary, secondary, accent, muted, destructive, positive, warning, link
  • Lines: border, separator, input, input-border, ring
  • Shape: --dt-radius-xs…2xl; heights: --dt-height-s|m|l, -cell, -panel-header, -tabbar; icons: --dt-icon-xs…xl
  • Motion: --dt-duration-fast|normal|slow (zero under reduced motion), --dt-ease-*. Layers: --dt-z-*