NgBootstrap for Angular 21 Guide | Generated by AI

Home 2026.03

Question: Which ng-bootstrap version matches Angular 21?

Answer:

The version of ng-bootstrap that matches Angular 21 is the 20.x.x series (specifically @ng-bootstrap/ng-bootstrap@^20.0.0).

According to the official compatibility table from the ng-bootstrap documentation:

The stable release 20.0.0 was published on December 12, 2025, and it explicitly bumps the minimum required Angular version to 21.0.0.

Older versions (e.g. 19.x for Angular 20, 18.x for Angular 19) are not compatible with Angular 21 without forcing installation (which usually breaks due to peer dependency mismatches or API changes).

To install the matching version in an Angular 21 project, run:

npm install @ng-bootstrap/ng-bootstrap@20
# or
ng add @ng-bootstrap/ng-bootstrap   # (it should pick a compatible version)

Always check the latest changelog or the getting-started page for any patch updates or breaking changes when upgrading.

References:


Back Donate