Skip to content
compodocx
Skip to article content

Guide 01

Features

cngxjs (opens in new tab)Updated Guide01of 13

What lands on the page after a build, grouped by area.

Modern Angular surface

  • Angular 21 and 22, standalone components, directives, and pipes. NgModules, decorator members, constructor injection, and class-based guards, interceptors, and resolvers are reported in one legacy notice, not documented.
  • Signals (opens in new tab) as first-class members: input(), output(), model(), signal queries, computed(), and linkedSignal(), typed by their value.
  • inject() and injectAsync() surface in a dependencies block. Angular 22 @Service classes and httpResource members get their own kinds.
  • The host metadata object, hostDirectives, providers and view providers, with provider calls linked.
  • Functional guards, interceptors, and resolvers, plus a typed route tree.
  • Effects rendered opt-in via --showEffects.
  • Component theming tokens parsed from CSS custom properties, SCSS variables, and @property rules.

Multi-version output

  • Default layout writes <output>/<versionLabel>/ with a shared versions.json manifest.
  • Version label auto-detected from the nearest package.json. Override with --versionLabel.
  • A version-switcher widget reads the manifest at runtime. Append-only, semver-sorted, no server config needed.
  • Cap visible entries with --maxVersionsShown. Pass 0 to show all.

Tooling

  • compodocx diff --old --new compares two --exportFormat json exports. Exits 0 on clean, 1 on additive, 2 on breaking changes.
  • compodocx playground:validate compiles every @playground with a real install and build.
  • compodocx migrate jsdoc removes the retired @category and @docsKind tags from your sources.
  • --exportFormat llm-md emits an LLM-context markdown bundle for AI assistants and code-review bots.
  • --exportFormat json emits a typed API export with schemaVersion and a shipped JSON Schema, suitable for diffing or downstream tooling.

Modern UX

  • SPA page swaps on static HTML, with deep links to tabs, members, and source lines by URL hash.
  • An interactive map of the project: feature islands, filter chips, and hop-by-hop impact on click.
  • Keyboard navigation: j / k through member cards, n / p through the sidebar entries, ? opens a shortcut overlay.
  • Shiki syntax highlighting with per-theme light/dark pairs.
  • Flicker-free dark mode and theme switching, applied before paint. No FOUC.
  • Pagefind search in a command palette (Ctrl+K), with filters by kind, library, feature, and WCAG level. Turn it off with --disableSearch.

Theming

  • Eight bundled themes: Slate Noir (default), Ocean, Midnight, Nord, Rose Pine, Ember, Neon, Brutalist.
  • Custom themes are a single CSS file overriding any subset of the --color-cdx-* tokens.
  • Per-theme Shiki light/dark pairs picked to match each palette.
  • Component and directive pages surface a Theming tab with grouped CSS custom properties, SCSS variables, @property rules, hooks, and mixins.
  • styleFiles documents free-standing sheets and collects unclaimed tokens on a design tokens page.

Accessibility

  • Skip-to-content link on every page.
  • :focus-visible rings on every interactive element. ARIA patterns on tabs, sidebar, and version switcher.
  • Respects prefers-reduced-motion and prefers-color-scheme.
  • WCAG AA contrast on default tokens. Per-theme palettes audited individually.
  • Per-entity @wcag and @a11y JSDoc tags surface conformance metadata in the entity hero and feed the search-palette WCAG facet.

Project structure

Structure derived from your code

Every documented symbol belongs to a feature: its entry point, then a key below it. compodocx derives it from ng-package.json entry files, the imports between folders, and, in apps, the folders below src/app. Correct it with an@feature tag or the features config. The page URLs follow the same structure.

Feature tree

menuLayout: 'feature' · default
  • Features chapter: entry points as a tree of their import path, each feature below its entry point.
  • Primary members on top; configuration, utilities, constants, and types in collapsed nodes.
  • References portal atreferences.html, listing every documented symbol.
  • Works for libraries and apps alike.

Per-kind tree

menuLayout: 'type' · opt-in
  • One chapter per kind: Components, Directives, Pipes, Injectables, Services, …
  • Each chapter is still grouped by feature.
  • Utilities and Dependency Injection get sidebar chapters of their own.
  • Only the sidebar changes. Pages and URLs stay the same.

Prefer one chapter per kind?

Config-only - no CLI flag. Full reference under Sidebar grouping.

json.compodocxrc.json
// .compodocxrc.json
{
  "menuLayout": "type"
}

Built on the project analysis

compodocx analyzes the whole project through your tsconfig. These work in both sidebar layouts.

Dependency injection chapter

Providers, feature functions, and tokens, with a dependency-injection.html landing page.

  • Providers that accept one feature type share a page with their feature functions.
  • Token pages show the shape of the type, the default factory, who provides it, and who injects it.
  • An Injection context badge marks what must run inside one.

Feature pages

An index.html in every feature folder.

  • Import path and the README of the feature folder; entry points and sub features as cards with a one-line summary.
  • Members by role, plus the feature’s routes and theming.
  • The features it builds on and the ones that extend it.

Used by

Who uses a symbol, from the project analysis instead of a text search.

  • Symbol pages list the declarations that reference them.
  • Guards and resolvers list the routes that use them.
  • Override name: referenced-by.

Search filters and axes

Multi-dimensional filtering in the command palette.

  • Chip rows: Kind, Library, Feature, WCAG.
  • classificationAxes adds one row per axis you declare, such as stability or platform.
  • OR within a row, AND across rows. Filter state persists in the URL.