CoreUI for Angular v5.7.25 - Declarative Nav Groups and Enclosed Variants
We are pleased to announce the release of CoreUI for Angular v5.7.25. This release adds c-nav-group, c-nav-group-items and c-nav-title, so navigation groups can be written directly in the template, introduces the enclosed and enclosed-pills variants for the Nav and Tabs components, and moves the Sidebar group collapse from @angular/animations to the Collapse directive with CSS transitions. As a result, @angular/animations is no longer a peer dependency of @coreui/angular. No breaking changes were announced in the published release notes, but a few defaults changed - see the Migration Notes below.
Speed up your responsive apps and websites with fully-featured, ready-to-use open-source admin panel templates—free to use and built for efficiency.
How to Update
To update to CoreUI for Angular v5.7.25, run:
ng update @angular/core@22 @angular/cli@22 @coreui/coreui@~5.9.0 @coreui/angular@~5.7.25
- Please ensure that there are no error messages in the results.
- See also:
What’s New
Declarative Nav Groups
Until now, nested navigation groups were available only by passing an INavData array to c-sidebar-nav. The new c-nav-group, c-nav-group-items and c-nav-title components let you write the same structure in the template:
<c-sidebar-nav>
<c-nav-title>Components</c-nav-title>
<c-nav-group toggler="Base" visible>
<c-nav-item href="#">Accordion</c-nav-item>
<c-nav-item href="#">Breadcrumb</c-nav-item>
<c-nav-group toggler="Forms" compact>
<c-nav-item href="#">Select</c-nav-item>
<c-nav-item href="#">Range</c-nav-item>
</c-nav-group>
</c-nav-group>
<c-nav-group toggler="Buttons">
<c-nav-item href="#">Button groups</c-nav-item>
<c-nav-item href="#">Dropdowns</c-nav-item>
</c-nav-group>
</c-sidebar-nav>
c-nav-grouptakes atogglerlabel or atogglerTemplate(which receives the visible state), avisibleinput with avisibleChangeoutput, andcompact.- Groups behave as an accordion within their level: opening one collapses its open sibling.
c-sidebar-navprovides the top level, and every group provides a level for its own children. - A collapsed group keeps the state of its nested groups, so reopening it brings them back as they were.
- A
cNavLinkthat becomes active - including throughrouterLinkActive- opens every group above it. - Outside
c-sidebar-nav, top-level groups keep their own state; provideNavGroupServiceon the container to make them an accordion as well.
See the Sidebar documentation for examples.
Enclosed Nav and Tabs Variants
The Nav variant input and the Tabs c-tabs-list variant input now accept enclosed and enclosed-pills:
<c-nav variant="enclosed">
<c-nav-item [active]="true" href="#">Active</c-nav-item>
<c-nav-item href="#">Link</c-nav-item>
<c-nav-item [disabled]="true" href="#">Disabled</c-nav-item>
</c-nav>
Nav Improvements
- Nav: New
roleinput onc-nav, defaulting tonavigation. - Nav item:
c-nav-itemrenders acNavLinkanchor whenhrefis set and forwardsactive,disabledandtabindexto it. Withouthref, the item projects its content as before.
Bug Fixes
- Nav link:
cNavLinksets thedisabledattribute only on elements that support it (button,fieldset,input,optgroup,option,select,textarea). Other hosts, such as anchors, getaria-disabled="true"andtabindex="-1"instead. - Nav link: An unset numeric binding no longer writes
tabindex="NaN". - Sidebar nav: A group’s nav stays displayed while it collapses, so closing animates instead of snapping shut.
- Sidebar nav:
.nav-iteminsidec-sidebar-navis now displayed as a block, restoring its top margin.
Refactoring
- Sidebar nav: Groups collapse with the
cCollapsedirective and CSS transitions instead of@angular/animations. - Sidebar:
c-sidebar,c-sidebar-nav,c-sidebar-nav-groupandc-sidebar-nav-linkno longer setChangeDetectionStrategy.Eager, so they use Angular’s default change detection strategy (OnPush in Angular 22). - Nav link:
cNavLinkno longer sets an inlinecursorstyle; the cursor is left to the stylesheet. - Schematics:
ng add @coreui/angularno longer installs@angular/animations.
Dependency Updates
We have updated key dependencies to their latest compatible versions for CoreUI for Angular v5.7.25:
Angular Core Updates
@angular/animationsremoved from the peer dependencies of@coreui/angular- the library no longer uses it
Development Tools
typescript-eslintto:8.69.0
Released Packages
Migration Notes
No breaking changes were announced in the published release notes. After upgrading:
- Install updated dependencies.
- Run your test suite and verify the build.
@angular/animationsis no longer a peer dependency of@coreui/angular. If you added it, and an animations provider, only for CoreUI, you can remove them; keep them if your own code or another library still uses Angular animations.c-navnow rendersrole="navigation"by default. Set theroleinput if your nav needs a different role.- The
c-navvariantinput no longer accepts an empty string - leave the input unset instead. - A disabled
cNavLinkon an anchor no longer gets thedisabledattribute; it keeps thedisabledclass and getsaria-disabled="true"andtabindex="-1". Update any CSS or tests that selecta[disabled]. cNavLinkno longer sets an inlinecursor: pointer. If you use it on an element that the stylesheet does not give a pointer cursor, such as an anchor withouthref, add the cursor in your own styles.
For a comprehensive overview of all changes, enhancements, and updates introduced in this release, please refer to the full changelog on GitHub.



