Principles
The principles
- Small surface, composition over configuration. A component keeps around a dozen behavioural inputs. Sub-features are child components, directives or typed option objects; user-facing strings come from
VigdxLabelsand can be overridden per instance. - Types flow from your data. No
anyin public signatures. New APIs take functions andkeyof Tinstead of string paths, regex strings or{0}templates, e.g. the passwordstrengthfunction or a table column'svalueaccessor. - Three styling layers: tokens, then parts, then a class. Change a CSS custom property first; reach a component's inside through its documented
data-partattributes; put a class on the host for the rest. No runtime stylesheets and no!important. See Customizing. - Stability. A renamed input keeps its old name as an alias for at least a full major version, warns once in development builds, and loses to the new name when both are set. A CI gate compares the public API (inputs, outputs, types and styling parts) with the committed report and fails a breaking change that is not marked as one.
- Docs lead with the happy path, then customization, accessibility and the API reference.
- Accessible by default, native elements first:
<dialog>,<button>, native inputs and the top layer, checked with AXE in every story. - Performance by construction: OnPush components on signals that run without zone.js; overlays render their content only while open. Form fields share one pair of document listeners for form submit and reset, and popovers and tooltips listen on the document only while they are open.
- One overlay system. Overlays use the browser's top layer and the CDK overlay container. There are no
appendToorzIndexinputs. New position values are logical:start/end(andtop-end…) mirror in right-to-left layouts. The olderleft/rightvalues are deprecated and stay physical, and so do the defaults of an unset drawer (right edge) and toaster (top right) until 3.0. - Forms: Signal Forms bind directly; Reactive and template-driven forms bind through
VigValueAccessor. Invalid styling comes from the control's state, not fromng-*classes. - Testable: tests query the
data-scope/data-partcontract, not class names or DOM structure, and so do the component harnesses of@vigdx/ui/testing(Testing). - One vocabulary.
closablewithcloseAriaLabeland(closed);headingfor titles;…AriaLabelfor text only screen readers hear,…Labelfor visible text;variantfor tone;sm/md/lgsizes;xChangefor two-way state and past tense for one-shot events.
What's simpler than PrimeNG
PrimeNG is a large, mature suite. If you are coming from it, these are the differences you will notice first, each with where to check it.
- Static CSS. Components ship no stylesheets of their own: their look is Tailwind utilities compiled at build time plus the static
theme.css, so the kit inserts no theme at runtime and needs no CSP nonce for it. Two limits under a strictstyle-src: the Angular CDK overlay behind select-type panels adds a small structural stylesheet through Angular (covered by Angular'sCSP_NONCE), and with server-side rendering,[style.…]bindings (a dialog's width, a drawer's size) are serialized asstyleattributes, which a policy without'unsafe-inline'for styles blocks in the server-rendered HTML. The kit is not fully strict-CSP compatible. - Token overrides at three levels — globally in your
@theme, on a subtree, or on one instance — with plain CSS custom properties (Theming). - Signal Forms plus a value-accessor bridge. Controls implement
FormValueControlfor[formField], andVigValueAccessorconnects them to Reactive and template-driven forms (Forms). - Top-layer overlays without
appendToor z-index settings. Dialogs and drawers are native modal<dialog>elements; other panels use the CDK overlay container, which the kit keeps above open modals. - A required
labelat compile time. Form fields declarelabelas a required input, so a field without one is a template compile error understrictTemplates, not an accessibility bug found later. - MIT for every version, with no license key or registration step.
- An API gate in CI. Each package has a committed
api-report.json; CI fails when the built API differs from it, and a breaking difference needs a!in the pull request title (seeCONTRIBUTING.mdin the repository).
Also true of the kit, though not a difference: PrimeNG 22 does not list @angular/animations or zone.js among its peer dependencies either.
- No animations package.
@angular/animationsis not a dependency; transitions are CSS, and reduced motion is respected. - Zoneless and OnPush. Every component uses OnPush change detection and signals, and the test suite runs without zone.js.
Moving an app over? See Migrating from PrimeNG for a component mapping and before-and-after examples.