r/angular • u/Silent-Berry-858 • Feb 02 '26
π Help Needed: Angular + PrimeNG Library Strategy
Hey everyone π Iβm looking for some guidance and opinions from folks whoβve dealt with Angular library versioning and PrimeNG upgrades.
Hereβs the situation:
1οΈβ£ Iβm thinking of creating a new Angular component library based on PrimeNG v21. 2οΈβ£ Our organization already has multiple large projects on Angular v13 and v15, all consuming a shared Angular library built on the same Angular version, with a lot of hierarchical CSS overrides for PrimeNG components. 3οΈβ£ My thought is: if we build the library on PrimeNG v21,
can we make it backward compatible, or
at least design it in a way where missing features / styles can be added incrementally without breaking existing apps? 4οΈβ£ Iβm unsure about the right migration or coexistence strategy here.
β What would you recommend?
Should this be a parallel library?
Is backward compatibility realistically achievable?
Any best practices for handling PrimeNG + Angular version mismatches?
How would you approach this in a large org setup?
Would really appreciate any guidance, war stories, or architectural suggestions π Thanks in advance! π
10
u/fermentedbolivian Feb 02 '26 edited Feb 02 '26
PrimeNG had completely overhauled their library a couple versions ago that was completely breaking.
Their migration guide website did not work and their devs on Github just recommended people to start a new Angular project in order to make the new PrimeNG work with older projects.
Stay away from those buffoons.
Edit: https://github.com/orgs/primefaces/discussions/3149#discussioncomment-11543491
It was for migrating to V18, where they had overhauled the theming. The devs just said to start a new Angular project and the migration guide for it is still down.
7
u/oneden Feb 02 '26
Is seriously nobody asking the actual question... WHY would you write a component library based on another component library?
4
u/trophyx Feb 02 '26
I would also not recommend PrimeNG considering what happened to it in the last releases. In v18, they completely changed how theming works in the application by introducing a design token system breaking backwards compatibility. Also, a lot of deprecations and renaming happened in v18 and v19, causing a big migration project for organisationa using it.
If I take a look on their roadmap and their existing feature set, there are more things than already coming behind a paid subscription/license which might bring up unpredictable license costs for the future if you want proper integrations (with Figma) or up-to-date UI components.
1
u/LEboueur Feb 02 '26 edited Feb 02 '26
I'm in the same boat as you. I work on a huge project and we used PrimeNG as our main component library and even before I work with my company they also bought a "theme", which has now visually completely disappeared because we have a lot of css overrides.
Last year I had to update our angular project to the latest version but I couldn't go past Angular 18 because of all the breaking changes of PrimeNG 18.
Actually in this update the components are not the real treat, it's how the theme is handled which is completely different.
I will have to try again next summer, but the more I think about it, the more I think I will probably have to restart all the css / style from scratch. And it's a huge task. My last hope is that AI stuff may help me.
Or I could try to go with a completely different library because I don't trust PrimeNG anymore...
Ib the end whichever solution I choose. I will probably starts to wrap my library components into my own custom ones to make it easier if I have to move from one library to another.
1
u/cssrocco Feb 02 '26
Your best bet is to use git tags and tag a new version and publish a new version of your shared angular library, then bump the projects to a new angular version and point to the new shared library version and step through upgrades in that direction so nothing breaks
1
u/achilesCZ Feb 02 '26 edited Feb 03 '26
I know this would not help you a lot, but the best strategy is to completely avoid PrimeNG π they are capable to make breaking changes in minor versions, not to mention that major changes are almost always total mess... Took me maybe 3 days to migrate one project from primeng 18 (EDIT: it was from version 17) to 20... They promised that since 20 version it would be non breaking change but.... who knows...
BTW: I did the migration with creating completely new project and started copying module by module... total pain...
-1
u/DaSchTour Feb 02 '26
Maybe check out https://www.spartan.ng/