Style Guide

NgNova Visual Foundations

NgNova UI combines static Tailwind classes with versioned CSS tokens for light, dark, reduced-motion, and forced-colors modes—without a hidden theme runtime.

Live token scope

Theme playground

Change brand and feedback tokens without rebuilding components.

Brand and feedback colors
In reviewHealthy

Tokens applied

Semantic feedback follows the scoped success color family.

Required setup

Tailwind stylesheet

NgNova UI ships static Tailwind utility classes plus an optional versioned token stylesheet. Consumer apps must let Tailwind scan the package and opt into class-based dark mode.

CSS example.html
1
2
3
4
@import 'tailwindcss';
@import '@ngnova/ui/styles/theme.css';
@custom-variant dark (&:where(.dark, .dark *));
@source "../node_modules/@ngnova/ui";

App shell

Toggle the dark class

Put the dark class on html or a parent app shell. Components respond automatically through their built-in dark: variants.

TypeScript example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { DOCUMENT } from '@angular/common';
import { Component, inject, signal } from '@angular/core';

@Component({
  selector: 'app-theme-toggle',
  standalone: true,
  template: `
    <button type="button" (click)="toggleTheme()">
      {{ darkMode() ? 'Light mode' : 'Dark mode' }}
    </button>
  `,
})
export class ThemeToggleComponent {
  private readonly document = inject(DOCUMENT);
  readonly darkMode = signal(false);

  toggleTheme(): void {
    this.darkMode.update((enabled) => {
      const next = !enabled;
      this.document.documentElement.classList.toggle('dark', next);
      return next;
    });
  }
}

Supported now

Light and dark modes

Every public component includes light styles plus dark-mode variants for surfaces, text, borders, focus rings, and common state colors.

Customization

Typography and icons

The NgNova docs use Inter Variable and a system monospace stack. Library components inherit the consumer application's font. Built-in disclosure and dismiss actions use crisp current-color SVG geometry, while Button icon marker directives normalize consumer-provided icon size, alignment, and accessibility without requiring one icon package.

Versioned contract

Theme tokens v1

Import @ngnova/ui/styles/theme.css to receive foundation, semantic, and component --ui-* custom properties. Override semantic tokens after the import; no JavaScript provider or forced font is required.