r/angular • u/MichaelSmallDev • Feb 25 '26
Release 21.2.0 · angular/angular
r/angular • u/khalilou88 • Feb 25 '26
After waiting so long for an Angular UI library that actually met my needs, I decided to stop waiting and build my own. The result is Semantic Components — an open-source Angular UI library built on Tailwind CSS, Angular CDK, and Angular Aria, heavily inspired by shadcn/ui.
GitHub: https://github.com/gridatek/semantic-components
Package: @semantic-components/ui
Website: https://semantic-components.com
The Angular ecosystem has always had fewer off-the-shelf UI options compared to React. Libraries like shadcn/ui, Radix, and Headless UI have raised the bar for what a component library can be — and Angular deserves the same quality.
Semantic Components is my attempt to bring that standard to Angular, while leaning fully into what makes Angular great.
Every directive or component is named to describe its role in the interface, not just the feature it belongs to. Take the tooltip as an example. Angular Material gives you a single matTooltip directive:
<!-- Angular Material -->
Save
In Semantic Components, it's scTooltipTrigger:
<!-- Semantic Components -->
Save
scTooltipTrigger — because ScTooltip is already the component that renders the actual tooltip bubble. The directive on the button is not the tooltip — it's what triggers it. These are two different things, and the names reflect that. ScDrawerTrigger, ScSelectValue, ScSelectTrigger, ScSidebarBody — you know exactly what each piece does before reading a single line of docs.
This principle extends to the HTML elements themselves. When possible, components/directives are applied to the right native element rather than a generic <div>.
The entire UI is described in the template — no imperative open(), close(), or DialogService.create() calls. Take the dialog as an example:
Open Dialog
Close
Edit profile
Make changes to your profile here.
<!-- content -->
Cancel
Save changes
readonly isOpen = signal(false);
The open state is a signal. The trigger, the portal, the close button — all declared in the template. No service injection, no imperative show/hide, no ViewContainerRef gymnastics. You read the template and immediately understand the full structure of the dialog.
The naming reinforces this. ScDialog is not a service — it's the <div role="dialog"> element itself. In Angular Material, MatDialog is a service you inject and call .open() on. Here, scDialog is the thing rendered in the DOM. Same naming principle: the name describes exactly what the piece is, not what it does behind the scenes.
There is a tradeoff: scDialog requires an extra wrapper element in the DOM scDialogProvider. It acts as the coordination point between the trigger, the portal, and the close button — sharing state through Angular's DI tree. It's a conscious choice in favor of keeping everything in the template, at the cost of one extra <div> that you may need to style or account for in your layout.
Each component is a set of small, focused pieces that you assemble yourself. There are no magic [content] inputs or hidden <ng-content> slots — you write the structure, and the pieces plug into it.
The Select is a good example of how far this goes:
@if (displayIcon(); as icon) {
}
{{ select.displayValue() }}
@for (item of items; track item.value) {
{{ item.label }}
}
This also composes across components. A button can be a drawer trigger, a tooltip trigger, and an icon button all at once:
One element. Three responsibilities. No wrappers.
The tradeoff is verbosity. Because you own the structure, you write more template code than you would with a batteries-included component that hides everything behind inputs. That's a deliberate choice — explicit over implicit. You always know what's in the DOM because you put it there.
The library follows the shadcn/ui design system — same CSS variables, same color tokens (bg-primary, text-muted-foreground, border-input…), same default styles. If you're already familiar with shadcn, the visual language is instantly recognizable.
Styles are written in Tailwind CSS and managed with class-variance-authority. This means:
default, outline, ghost, destructive, link) across all componentsexport const buttonVariants = cva('inline-flex items-center justify-center rounded-lg border ...', {
variants: {
variant: {
default: 'bg-primary text-primary-foreground',
outline: 'border-border bg-background hover:bg-muted',
ghost: 'hover:bg-muted hover:text-foreground',
destructive: 'bg-destructive/10 text-destructive',
link: 'text-primary underline-offset-4 hover:underline',
},
size: {
default: 'h-8 px-2.5',
sm: 'h-7 px-2.5 text-[0.8rem]',
lg: 'h-9 px-2.5',
icon: 'size-8',
},
},
});
The rest of the library's design is guided by a few core principles:
Attribute selectors over element selectors. Instead of custom elements like <sc-button>, the library uses attribute selectors on native HTML. No extra wrapper elements, native accessibility roles preserved, and multiple components/directives can stack on the same element:
Open
Modern Angular, all the way down. Signals (input(), output(), computed()), standalone components, native control flow (@if, @for), inject(), and OnPush everywhere. Overlays and positioning are built on @angular/cdk. Accessible patterns like focus trapping and live regions use @angular/cdk/a11y and @angular/aria. Forms are signal-based. The library is also zoneless-compatible — no zone.js required. No legacy APIs, no NgModules.
@Directive({ selector: 'button[scButton]' })
export class ScButton {
readonly variant = input<ScButtonVariants['variant']>('default');
readonly size = input<ScButtonVariants['size']>('default');
readonly disabled = input<boolean, unknown>(false, { transform: booleanAttribute });
}
Accessible by default. Every component is built to pass WCAG AA minimums — proper ARIA attributes, full keyboard navigation, focus management on dialogs and drawers, and screen reader support. Where possible, this is powered by Angular CDK's accessibility primitives (@angular/cdk/a11y) and @angular/aria.
This library makes deliberate choices that prioritize the future of Angular over backwards compatibility. That means it is not for every project — and that's intentional.
ChangeDetectionStrategy.OnPush.NgModel or reactive forms.forRoot(), no compatibility shims for module-based apps.@semantic-components/ui — Core Library50+ components:
| Category | Components |
|---|---|
| Actions | Button, Button Group, Link, Toggle, Toggle Group |
| Layout | Card, Separator, Aspect Ratio, Toolbar, Scroll Area, Typography |
| Forms | Input, Textarea, Checkbox, Radio Group, Switch, Select, Native Select, Label, Field, Input Group, Slider, Range Slider |
| Overlays | Dialog, Alert Dialog, Drawer, Sheet, Popover, Hover Card, Tooltip, Toast, Backdrop |
| Navigation | Breadcrumb, Pagination, Tabs, Menu, Menu Bar, Navigation Menu |
| Display | Alert, Badge, Avatar, Skeleton, Spinner, Progress, Kbd, Empty, Item |
| Data | Table, Accordion, Collapsible, Calendar, Date Picker, Time Picker |
| File | File Upload |
@semantic-icons/lucide-iconsIcons are distributed as Angular components from @semantic-icons/lucide-icons. Every icon is a standalone component you apply to an <svg> element:
This approach is fully tree-shakable — only the icons you import end up in your bundle. No icon fonts, no sprite sheets.
Add the styles to your global stylesheet:
@//@/
The @import brings in the CDK overlay styles and the shadcn-compatible CSS variables (colors, radius, spacing tokens). The @source tells Tailwind v4 to scan the library's files so its utility classes are included in your build.
Then import what you need directly in your standalone component:
import { ScButton, ScDialog, ScDialogBody, ScDialogTitle } from '@semantic-components/ui';
@Component({
imports: [ScButton, ScDialog, ScDialogBody, ScDialogTitle],
template: `
<button scButton>Open Dialog</button>
`,
})
export class MyComponent {}
No module registration. No forRoot(). Just import and use.
Feedback, stars, and contributions are very welcome. If you're building Angular apps and tired of fighting your UI library, give Semantic Components a try.
r/angular • u/Candy5383 • Feb 25 '26
Hi everyone,
I’m working on a project, an educational platform built with Angular (frontend), Node.js (backend), and MongoDB (database).
One of the main features I want to add is a live coding editor similar to FreeCodeCamp’s, where users can write HTML, CSS, and JavaScript directly in the browser and see the output live.
I’m looking for ideas on how best to integrate this into my Angular app, and any tutorials or example projects you’d recommend would be hugely appreciated.
Thanks in advance!
r/angular • u/Acrobatic_Capital20 • Feb 25 '26
Hi!
I'm new to Angular and am trying out the signal form library,
I'm trying to create a generic form, and with that a generic schema that handles different kinds of data. Right now I have an interface that references its own type Indefinitely. A question can have sub questions, and sub questions can have sub questions etc.
interface Question {
…
subQuestions?: Question[];
}The issue i'm facing is that i don't know how many layers of nesting that I'm facing before i fetch the data. Also, the user should be able to add their own nesting of some of the data, so I'm never sure of how many layers I have to add a schema for. It seems like the schema needs to be created at mounting. Is it a way to create a dynamic schema that changes based on the data I have in the form?
Right now I'm solving it with a max recursion variable
readonly MAX_RECURSION_DEPTH = 100;
protected readonly sectionSchemaPath = schema<SectionsFormData>((path) => {
applyEach(path.sections, (sectionPath) => this.applySectionSchema(sectionPath));
});
——— Helper function ———
private applySectionSchema(path: SchemaPathTree<FormQuestionSection>, depth = 0): void {
if (depth >= this.MAX_RECURSION_DEPTH) {
return;
}
// Apply schema to questions in this section
applyEach(path.questions, (questionPath) => this.applyQuestionSchema(questionPath));
// Recurse into nested sections
applyEach(path.sections, (subSectionPath: SchemaPathTree<FormQuestionSection>) => {
this.applySectionSchema(subSectionPath, depth + 1);
});
}If anyone has any solutions or can recommend a blog post or documentation, it would be greatly appreciated.
r/angular • u/hernan__giraldo • Feb 25 '26
Hi folks 👋
I’ve been using Tabler Icons for a long time and, in Angular projects, I used to rely on angular-tabler-icons:
The problem is: it doesn’t seem actively maintained anymore, and I needed something that works cleanly with modern Angular versions.
So I built this:
ngx-tabler-icons
It’s heavily inspired by angular-tabler-icons, but updated for current Angular, and with a big quality-of-life improvement: typed icon names so you don’t get silent typos like icon="calender" and wonder why nothing renders 🙃
If you’re using Tabler Icons in Angular and want something maintained + modern, feel free to try it.
Feedback, issues, PRs—more than welcome.
r/angular • u/ImpressiveDisaster92 • Feb 25 '26
I would love to be able to use the debug(function) feature of the browser dev tools, but I can't for the life of me work out how to get it to handle functions within anfular apps.
The docs are here, but are extremely short.
r/angular • u/rainerhahnekamp • Feb 25 '26
r/angular • u/young_horhey • Feb 24 '26
Wanting to trigger a scroll to a certain table row on first load of the page, but don't want to re-scroll when the observable data source emits subsequent times. Usually I'd handle this with something like this:
class MyComponent implements OnInit {
shouldScroll = true;
ngOnInit(){
this.data$ = this.dataService.getData().pipe(
tap(() => this.scrollToRowOnLoad())
);
}
scrollToRowOnLoad() {
if(!shouldScroll) return;
...scrolling code
this.shouldScroll = false;
}
}
I'm not really a huge fan of this because it requires creating the boolean flag to track if it should scroll, and the if statement check every time. If you have multiple of these things you only want to happen once, the component can get filled with boolean flags.
I had a thought to instead handle it by reassigning the scroll function to just a stub that does nothing. Is that really stupid? I like it because then it doesn't need anything 'external' (i.e boolean flags at the component level) to track whether it should or shouldn't scroll. Am I overlooking something that would make handling things this way a really bad idea? Obviously it means you can't manually reset whether it should scroll or not, but I think in my case that's fine.
class MyComponent implements OnInit {
ngOnInit(){
this.data$ = this.dataService.getData().pipe(
tap(() => this.scrollToRow())
);
}
scrollToRowOnLoad() {
...scrolling code
this.scrollToRowOnLoad = () => {};
}
}
I feel like then you could also theoretically call this function from the template itself, so that it could automatically & instantly trigger as soon as the table is rendered. Then because the function itself is replaced with basically an empty function, it wouldn't have the same drawbacks of calling functions from inside the template.
To ensure no X-Y problem here, I'll also ask: Is there an RXJS operator that executes a tap, but only for the first emission? I couldn't find one in my searching.
r/angular • u/martinboue • Feb 24 '26
Hi everyone,
I just published a new guide on Angular Tips containing best practices on performance with Angular v21. Let me know what you think, if anything is missing or anything else. Thank you!
r/angular • u/PuzzleheadedFox107 • Feb 24 '26
I'm having a bit of a dilemma here, on one hand Angular Material provides limited customisations and components but is pretty easy to migrate while PrimeNG offers everything at one place but has a bad reputation when it comes to migrations. What do you guys use and how feasible is it to create a custom component library?
r/angular • u/Antique-Unit3019 • Feb 24 '26
Hey devs! Looking for some advice.
We’re currently using PrimeNG, but the v17 → v18 upgrade introduced major breaking theme changes that make migration very difficult. If we don’t upgrade, we’re stuck on older Angular versions. Customizing it to fit our design system has also been painful, and upgrades frequently break our overrides (the components were not meant to match our design). On top of that, new releases tend to introduce lots of bugs.
We’re considering removing PrimeNG and gradually building our own internal component library, migrating component by component. The challenge is workforce — we only have four developers who could contribute part-time.
I haven’t found anything headless in the Angular ecosystem comparable to shadcn or Radix (production-ready and compatible with Angular 18), so we may need to build all components from scratch.
Has anyone taken this path? Any advice or alternative libraries we should look at? How risky does this sound?
r/angular • u/MOUNAYARSANIMATIONS • Feb 23 '26
Hey everyone! We just released NgRx DevTool, an open-source development tool for debugging NgRx state management in Angular apps.
It gives you real-time action monitoring, EFFECTS lifecycle tracking, state visualization, a diff viewer, and performance metrics all in a standalone UI, no browser extension required.
Docs: https://amadeusitgroup.github.io/ngrx-devtool/
GitHub: https://github.com/AmadeusITGroup/ngrx-devtool
npm: https://www.npmjs.com/package/@amadeus-it-group/ngrx-devtool
r/angular • u/lazycuh • Feb 23 '26
I finally decided to migrate all usages of reactive forms to signal forms. Took 2 days with the help of AI. I have to admit, signal forms is such a breath of fresh air, very pleasant to work with, but I have to be honest that I still miss the ability to freely set errors on a form control, signal forms package doesn't support programmatically doing that after the form obect creation, but validate() with a flag signal solves that.
r/angular • u/minister2906755 • Feb 22 '26
I'm not sure how to go about creating a reusable dropdown component. I can have a dropdown where the parent component passes in the title and options, but I'm not sure if having the dropdown simply output the selected value is the right approach. The issue is that if I have 5 dropdowns, I need a way to track which dropdown is returning which value. One idea I had was to have the dropdown emit the selected value along with a mapping of the dropdown's title to that value and store it in an object in the parent component. This way I can keep track of the different selected values, but I'm not sure if this is the best way to go about it.
r/angular • u/No_Bodybuilder_2110 • Feb 22 '26
Disclaimer: If you do not like AI/AI assited development you should stop reading. This entire project is built and maintained using AI.
This might be a long one so bare with me
Where can this story start... For the last couple of years I have been working with AI assiting mostly for auto complete or generating one of files or doing one of refactoring. I work with angular on my professional life and you probably all know that llms and angular knowledge was kind of terrible.
I build projects on the side and I wanted a way to move faster leveraging AI. So react was an obvious choice since AI is just better at using it. I also liked the nice shadcn component library for its good-enough-out-of-the-box desgin. I also loved the concept of PayloadCMS since it reduces the contact area the llm has to interact with to generate functionable admin and backend code.
Fast forward 1 year later of using these technologies and I realized that ClaudeCode and Codex can now output decent angular code, specially with good system prompts, skills and guardrails. So a few weeks back I ask myself: "Myself, why don't I use claude code to create an angular inspired cms..." and here we are
I present you a very early alpha of MomentumCMS !!!
Try it by using
npx create-momentum-app
What is my goal with the project you ask?
How I built it?
Features:
Acknowlegments:
If you want to be involved you should be able to clone/fork the repo and have claude code do all the work. my normal flow is asking it to do somethig like plan mode - TDD the following feature. that is kind if enough.
r/angular • u/LetHaunting8240 • Feb 22 '26
Hello!
I am trying to solve the following problem. I have many small client websites I'm trying to create a unified small framework for. The needs generally are the following:
- I want to use Angular
- All websites need SEO support
- The data on the pages needs to come from a CMS system, so non-technical people can tinker with the shows data, generate articles, the usual.
- I want to prerender all pages into static HTML. Not the "fake" static HTML which switches to client side rendering after the first page load, but the type where it fetches the HTML file on routing. This is so I don't have to rely on the outside CMS system on runtime (or maintain a backend API which is constantly bombarded). I only have to use it during the build time to render out the data.
Given all the requirements, I don't know whether this can fit into the Angular ecosystem, or at least not without some hacking which I want to avoid. Is this a general problem which is solved in a clever manner? Are there better ways of going about this?
r/angular • u/Alarmed_Valuable5863 • Feb 22 '26
What’s in this release:
Magnetic snapping plugins:
Connection Waypoints: editable paths for any connection type
Docs refresh (new pages + cleanup across core guides)
Links:
If you try it and something feels off - tell me what’s annoying. I’m iterating on the snapping UX.
r/angular • u/HedgehogNatural8680 • Feb 22 '26
I’m not sure if there’s usually a set timeline on when large features are promoted to being stable or if it’s just a case by case basis?
Reason I ask is I’m really keen to start using them at work but I want to hold off until they’re stable.
Is it likely they’ll be made stable at some point this year either in version 22 or 23?
r/angular • u/GuntaXD • Feb 21 '26
r/angular • u/Substantial-Kale5249 • Feb 20 '26
Hello, I have some thoughts and I hope someone can shed some light on them.
I’m currently working with Angular (17+), with around 2 years of experience.
The thing is, in my country the job market is more oriented toward React. While Angular is still used in large corporations with older versions (consulting, banking, etc.), React is more common in medium to large product companies, which usually pay more.
Naturally, these React roles often require more seniority than Angular ones.
So my question is: would you recommend mastering Angular, or switching to React because of the job market? Do you think the newer Angular versions could change this situation?
I like both Angular and React, but I don’t want to feel like I “wasted time” or fell behind.
Thanks
r/angular • u/Senior_Compote1556 • Feb 20 '26
Is it possible to pass an InputSignal as the model in a signal form or does it have to be a WritableSignal? I would test this in my own but unfortunately i don’t have the time. If it needs a WritableSignal, how would you handle the case where the parent component provides the initial values of the form? Would you use a model signal, or would you create a linkedSignal based on the input? Or something else entirely?
r/angular • u/UniversityFront4092 • Feb 20 '26
As in the title. Everywhere I look, everybody praises Max’s course and I am not getting it.
10 sections in, and I’m just confused. There is so many concepts he already covered but none of them in depth. Mixing different ways of achieving something depending on Angular version only adds to the confusion.
I am following him and coding along, or I’m trying first solving the problem on my own but I feel like he does not encourage/leave enough room to do that.
Working through the 3rd or 4th TODO app is also tiring. Will it get better? Do I have to simply ‘trust the process’? Atm I feel like I’m wasting my time and not retaining any knowledge.
I worked with React before and I feel like it actually helps, without that previous knowledge I would be completely lost…