Theming

Available Giddaa UI theme tokens and how to override them.

Giddaa UI ships its base styles through @giddaa-housing/ui/styles.css. Import that file once, then define your app's theme values after it.

@import "@giddaa-housing/ui/styles.css";

Only import @giddaa-housing/ui/css/giddaa.css if the app wants the Giddaa brand theme. If you are defining your own theme, do not import giddaa.css; set your own values after styles.css.

@import "@giddaa-housing/ui/styles.css";

@theme {
  --font-sans: "Red Hat Display Variable", ui-sans-serif, system-ui, sans-serif;
  --color-canvas: #ffffff;
  --color-fg-primary: #111827;
  --color-action-primary: #166534;
  --color-action-primary-hover: #14532d;
  --color-line-focus: #166534;
}

.dark {
  --color-canvas: #0f172a;
  --color-fg-primary: #f8fafc;
  --color-action-primary: #22c55e;
  --color-action-primary-hover: #16a34a;
  --color-line-focus: #22c55e;
}

/* Mirror of the `@theme` values so a `.light` subtree can sit inside `.dark`. */
.light {
  --color-canvas: #ffffff;
  --color-fg-primary: #111827;
  --color-action-primary: #166534;
  --color-action-primary-hover: #14532d;
  --color-line-focus: #166534;
}

Declare every token you override in .dark again in .light; a token that only one scope sets leaks the other scope's value when the two are nested.

Semantic color tokens

These are the primary consumer-facing tokens. Tailwind utilities map from the token name, so --color-surface is used as bg-surface, --color-fg-primary as text-fg-primary, and --color-line as border-line.

TokenUse
--color-canvasPage canvas.
--color-surfaceDefault app surface.
--color-surface-raisedRaised cards, panels, and muted containers.
--color-surface-overlayOverlays, popovers, dialogs, and floating surfaces.
--color-surface-brandBrand-filled surfaces.
--color-surface-brand-subtleSubtle brand background.
--color-surface-accentAccent-filled surfaces.
--color-surface-accent-subtleSubtle accent background.
--color-surface-danger-subtleSubtle danger background.
--color-surface-info-subtleSubtle informational background.
--color-surface-glass-buttonButton chrome over imagery.
--color-surface-glass-overlay-buttonGlass overlay button fill.
--color-surface-glass-overlay-container-1First glass overlay container fill.
--color-surface-glass-overlay-container-2Second glass overlay container fill.
--color-fg-primaryPrimary text.
--color-fg-secondarySecondary text.
--color-fg-caption-placeholderCaptions, placeholders, and subdued text.
--color-fg-brandBrand text.
--color-fg-dangerDanger text.
--color-fg-infoInformational text in the Giddaa theme.
--color-fg-accentAccent text.
--color-fg-on-brandText on brand-filled surfaces.
--color-fg-on-accentText on accent-filled surfaces.
--color-line-subtleSubtle dividers and low-emphasis borders.
--color-lineDefault borders and dividers.
--color-line-strongStrong borders and dividers.
--color-line-focusFocus rings and active outlines.
--color-line-dangerInvalid and danger borders.
--color-action-primaryPrimary action fill.
--color-action-primary-hoverPrimary action hover fill.
--color-action-primary-pressedPrimary action pressed fill.
--color-action-secondarySecondary action fill.
--color-action-secondary-hoverSecondary action hover fill.
--color-action-secondary-pressedSecondary action pressed fill.
--color-action-tertiaryTertiary action fill.
--color-action-tertiary-hoverTertiary action hover fill.
--color-action-tertiary-pressedTertiary action pressed fill.
--color-action-accentAccent action fill.
--color-action-dangerDanger action fill.
--color-action-danger-hoverDanger action hover fill.
--color-action-danger-pressedDanger action pressed fill.
--color-whatsapp-greenWhatsApp action fill.
--color-status-successSuccess states.
--color-status-warningWarning states.
--color-status-dangerDanger states.
--color-status-infoInformational states.
--borderShared default border alias.

--color-whatsapp-button is a deprecated alias of --color-whatsapp-green. It still resolves, so existing bg-whatsapp-button utilities and theme overrides keep working, but it will be removed in the next major.

Type tokens

FamilyTokens
Font--font-sans
Display--text-gdt-display, --text-gdt-display--line-height, --text-gdt-display--letter-spacing, --text-gdt-display--font-weight
Heading 1--text-gdt-h1, --text-gdt-h1--line-height, --text-gdt-h1--letter-spacing, --text-gdt-h1--font-weight
Heading 2--text-gdt-h2, --text-gdt-h2--line-height, --text-gdt-h2--letter-spacing, --text-gdt-h2--font-weight
Heading 3--text-gdt-h3, --text-gdt-h3--line-height, --text-gdt-h3--font-weight
Heading 4--text-gdt-h4, --text-gdt-h4--line-height, --text-gdt-h4--font-weight
Heading 5--text-gdt-h5, --text-gdt-h5--line-height, --text-gdt-h5--font-weight
Body--text-gdt-xl, --text-gdt-xl--line-height, --text-gdt-lg, --text-gdt-lg--line-height, --text-gdt-md, --text-gdt-md--line-height, --text-gdt-sm, --text-gdt-sm--line-height, --text-gdt-xs, --text-gdt-xs--line-height
Small labels--text-gdt-subtext, --text-gdt-subtext--line-height, --text-gdt-capitalized, --text-gdt-capitalized--line-height, --text-gdt-capitalized--font-weight

Layout tokens

FamilyTokens
Radius--radius-sm, --radius-md, --radius-lg, --radius-xl, --radius-2xl, --radius-3xl, --radius-4xl
Spacing--spacing-gdt-xs, --spacing-gdt-sm, --spacing-gdt-md, --spacing-gdt-lg, --spacing-gdt-xl, --spacing-gdt-2xl, --spacing-gdt-3xl, --spacing-gdt-4xl, --spacing-gdt-5xl, --spacing-gdt-6xl, --spacing-gdt-7xl

Chart tokens

The base chart API reads from these semantic chart slots. Define values that match your app theme.

TokenUse
--color-chart-1First categorical chart series.
--color-chart-2Second categorical chart series.
--color-chart-3Third categorical chart series.

Effects tokens

FamilyTokens
Gradients--gradient-hero-forest, --gradient-hero-forest-moss, --gradient-surface-canvas-lift, --gradient-surface-card-lift, --gradient-surface-brand-tint, --gradient-accent-brass-rise, --gradient-accent-forest-to-brass, --gradient-accent-emerald-to-brass, --gradient-overlay-photo-bottom, --gradient-overlay-photo-dual
Shadows--shadow-1, --shadow-2, --shadow-3, --shadow-4
Elevation 0--elevation-e0-bg, --elevation-e0-border, --elevation-e0-shadow
Elevation 1--elevation-e1-bg, --elevation-e1-border, --elevation-e1-shadow
Elevation 2--elevation-e2-bg, --elevation-e2-border, --elevation-e2-shadow
Elevation 3--elevation-e3-bg, --elevation-e3-border, --elevation-e3-shadow
Elevation 4--elevation-e4-bg, --elevation-e4-border, --elevation-e4-shadow

Animation tokens

TokenUse
--animate-slideUpSlide-up entrance animation.
--animate-slideDownSlide-down animation.
--animate-scrollContinuous horizontal scroll.
--animate-bouncing-loaderBouncing loading indicator.
--animate-accordion-downAccordion expand animation.
--animate-accordion-upAccordion collapse animation.
--animate-sonar-glowSonar glow pulse.
--animate-round-sonar-glowRound sonar glow pulse.
--animate-sonar-waveSonar's outward ring. Scales and fades a box-shadow ring, so it traces any border radius without leaving the compositor.
--animate-spin-slowSlow spin animation.

Theme scopes

Theming is class-based and symmetric. .dark switches a subtree to the dark tokens, .light switches one back to the light tokens. Add the class to an ancestor — every component below it picks up the new token values; no component takes a theme prop.

<html className="dark">
  <body>{children}</body>
</html>

Because both classes re-declare every themed token, they nest. Use .light for an island that must stay light inside a dark app (or the reverse):

<div className="dark">
  <section className="light">
    <TopNavbar brand={<Logo />} items={items} />
  </section>
</div>

dark: utilities are scoped the same way and do not apply inside a .light island. Alternating deeper than one level (.dark inside .light inside .dark) is not supported.

One caveat: popups, dialogs, and sheets render in a portal on document.body, so they inherit the theme on <html> or <body> — not a scope class further down the tree. When you scope a theme to part of the page and its portalled surfaces must match, pass the class to that surface too (for example positionerProps={{ className: "light" }} on TopNavbar.Viewport, or className="light" on MobileSidebar.Content).

Only override dark tokens inside .dark; do not fork component styles for theme switching unless a component has a documented exception.

On this page