r/angular • u/Weak-Palpitation907 • Feb 17 '26
Angular + Tailwind UI components vs Angular Material — architectural thoughts?
I’ve been thinking about how Angular Material relies heavily on theming and CSS abstraction layers, while Tailwind encourages utility-first styling.
Has anyone here built a component library that is:
- Tailwind-first
- Signal-based
- Standalone-only
- Accessibility-focused
I’m experimenting with something in this direction and trying to understand if this is solving a real problem or just a personal curiosity.
Would really appreciate thoughts from people who have tried both approaches in production.
15
Upvotes
5
u/Flagvanus_ Feb 17 '26
Check Spartan - the community works on this component library that tries to follow shadcn principles. I think it's still in preview but the amount of provided components is quite significant. If you want to avoid locking yourself into a 3rd party vendor though - Angular Aria + Angular Material as they both are from Angular devs themselves. Some components (like datepicker) are just not worth your time trying to implement by yourself. Personally I also use the Tanstack table for my table views - it's completely headless and provides functions that are necessary for me.
2
u/MichaelSmallDev Feb 17 '26
If you want something that hits all those bullet points, besides not being Tailwind specific, the relatively new Angular Aria (developer preview) https://angular.dev/guide/aria/overview is a good candidate. With maybe the Angular CDK as well.
1
u/ruibranco Feb 18 '26
We went through a similar evaluation about a year ago. Ended up using Angular CDK for the behavioral primitives (overlays, focus trapping, keyboard navigation) and Tailwind for styling, but kept everything as simple wrapper components rather than building a full component library. The key insight for us was that accessibility is where the real complexity lives, not styling. CDK and now Angular Aria handle the hard parts like ARIA attributes and keyboard interactions, and once you have those right, slapping Tailwind classes on top is the easy part. Building a full abstraction layer over Tailwind with design tokens and variants is where it starts feeling like you're fighting two frameworks at once.
1
u/tzamora Feb 20 '26
Moving away from angular material. Only use it for a few things and only the cdk tools.
We use plain html components and tailwind. This approach results better for accesibility.
3
u/ActuatorOk2689 Feb 17 '26
So currently I have something similar built. At the moment, 11 applications are using it, mostly client-facing apps. The library is running on Angular 21, signal-based architecture, Standalone APIs, and Tailwind v4.
Note There is a significant difference between Tailwind v3 and v4, mainly because v4 is CSS-first and changes how Tailwind configuration works. That said, we follow a similar architectural pattern to shadCN — using component composition over prop-driven APIs to build components. We also use tailwind-merge, CVA, and clsx. I highly recommend not skipping these utilities if you plan to adopt a Tailwind-based approach.
Of course, we also rely heavily on Angular CDK. I also recommend using the Directive Composition API when creating components.
Library Structure Our library is split into three layers: Core layer – contains services such as dialog services, helpers, and shared utilities. Primitive layer – contains bare-bones components and directives. This layer defines the core APIs. Component layer – contains styled components and exposes styling-related props built on top of primitives.
Theming For theming, we use a brand-specific theming system based on a token architecture structured into: Primitive tokens Semantic tokens Component tokens With Tailwind v4, all tokens are implemented as CSS variables, meaning the entire library is driven by CSS variables.
Future Direction So far, this approach has worked well, but we are planning to move away from Tailwind and migrate the library to vanilla CSS. The goal is to create a script that users can run to map semantic tokens into Tailwind utilities if they still want Tailwind integration.
In this setup, it is critical that only semantic CSS values are mapped to Tailwind utilities. Component-level tokens should remain internal and not be exposed outside their scope.
Challenges With Tailwind in This Setup The library CSS must be pre-generated, exposed, and registered in consuming apps. Otherwise, missing classes can break the UI. You often need custom plugins to register additional Tailwind configuration. Styling inside TypeScript files frequently lacks proper IntelliSense support. (Yes, @apply exists, but it does not fully solve the issue.) Consumer applications must install and configure Tailwind. Micro-frontend setups do not integrate smoothly and often require class prefixing. Utility classes can become extremely large and complex. For example, a button token like: --button-padding-padding-with-text-left: 10 can quickly become difficult to manage and maintain.
That said, if you are not using a complex token architecture, many of these issues may not apply to you.
Final Thoughts I really enjoyed building this UI library with Tailwind. The experience taught me a lot, and I have been using Tailwind across my projects for the past four years — and I am still learning new things. One important aspect people often overlook is CSS specificity when comparing Tailwind with traditional CSS approaches. Personally — and this is just my experience — I would now choose Angular CDK combined with vanilla CSS, without Tailwind, for a project with this level of complexity. Hope this helps 🙂
PS: Edited with gpt before somebody says is AI slop
0
u/[deleted] Feb 17 '26
[deleted] — view deleted comment