Summarize with AI:
You can have both AI code generation and a solid component library at the foundation. Here are the top six reasons to use both in an integrated approach to code.
One of the hottest hot takes that I see floating around the developer space these days is “Why would I ever use a component library anymore when I can just generate all the components myself with AI?” On the surface, it seems like a fairly reasonable question to ask.
After all, one of the main reasons why developers reached for a component library in the past was to avoid the work of building complex components. And that’s fair! As someone who once had to build a color picker from scratch, I get it—I’m not particularly keen on ever repeating that experience, either.
But now, that’s not really a pain point anymore. If I don’t want to build that color picker myself, I can just ask my new best friend Claude (or Copilot or Cursor or whatever) to do it for me. In a matter of minutes, I can have my shiny new component with no need to wrangle the code myself. That’s the obvious answer … right?
Well, maybe not. While it’s certainly possible to have every component in your application generated by your AI tool of choice, I’d argue that it’s not the best solution. Instead, I’d say that your code generation will be better if you use AI with component libraries. This doesn’t have to be an either/or situation. Why choose when you can have both? Here are my top six reasons why component libraries should remain a core part of your frontend infrastructure, even if you’re a full-on vibe coder:
AI cannot generate from nothing: the code it creates for you is based on the code samples that it has access to. And you know what creates thousands of standardized examples of the exact same components used in all kinds of different situations? Yep: component libraries.
When tons of developers are using the same set of components, there’s more sample data for the AI to learn from. That means it will be able to reproduce better patterns, make more effective choices and generate fewer mistakes. And this goes beyond just the stuff other developers have built using these components. Any worthwhile component library will also come with pages and pages of documentation. Feature overviews, configuration details, API guides, troubleshooting, recommendations, official demos and sample code—what more could your coding agent ask for?
Well, now that you’ve asked … what about third-party reference material? Larger and more popular component libraries will also have unofficial “documentation” in the form of technical blogs, walkthroughs, videos and sample repos that were created by the community. The longer the component library has been around, the more content will have been created—and the more content the AI has to reference, the better the output.
Let’s be honest for a moment: AI code generating tools do not excel at accessibility. They’re getting better, and I think it’s even fair to say that there will be a time (hopefully in the not-too-distant future) where they might even be good at it. But that day is not today. Until that gap closes, we (the human developers) are still responsible for making the applications and software we build as accessible as possible.
One of the best ways that we can do that—and one that the article linked above calls out specifically—is to leverage libraries that have accessibility built-in on the component level. While it’s possible to attempt to include accessibility constraints and instruction in your prompts, giving an AI code generator a set of accessible primitives to work with will get you a lot further.
The deepest solution is architectural. Instead of relying on every prompt to produce correct primitives, use libraries that encode accessibility into their API contracts.
One of the best parts about using prebuilt components has always been the functionality that comes already baked in. It’s not hard to build a basic data grid that displays the content—the difficulty comes with the virtualization, sorting / filtering / grouping, exporting and more. Each additional feature that you have to build (or generate) is extra code in your codebase that has to be maintained and managed indefinitely.
Using a component library means you can take advantage of code that someone else is maintaining—and isn’t that the dream, ultimately? Your lines of code go down because it takes fewer lines of code to pass true into the predefined sort property than it does to build a sorting function. “But wait!” you cry. “Why do I care how many lines of code something is if I can just make the AI write those lines of code for me?” Well, unfortunately, you do still have to understand, review and maintain those AI-generated lines of code. Nobody is really reading that 2,000+ line PR, but they might read a 200 line one—isn’t that what you’d rather deal with? Less stuff generated from scratch means less to review—and fewer chances for errors to slip in, in the first place.
You know what comes with fewer things to generate and fewer revision cycles to correct errors? Fewer tokens. Most AI coding tools charge by token consumption, which means every line of generated code, new prompt and iteration has real cost attached. Complex components with lots of edge cases can take several revision cycles before they’re production-ready, and those cycles add up.
Using a component library helps cut that cost at multiple points. To begin with, you’ll write shorter prompts and (as mentioned earlier) generate less code because the AI is handling configuration and composition code rather than implementation code. Telling a well-documented component what to do is a much shorter prompt than asking an AI to build that functionality from scratch. Because the output is more predictable, you’ll also spend fewer tokens on corrections. That may not make much of a difference for a single component, but it absolutely scales when you’re doing it across an entire application.
Back to human review—AI won’t get it right every time (at least, not yet), which means there will always be places a human needs to step in and make corrections. We already know that it’s harder to open up a document you’re not familiar with and orient yourself in someone else’s code, but that mental lift gets a little easier if you are at least familiar with the tools being used.
Component libraries offer the benefit of consistent patterns: the same properties, the same naming structures, the same mental model. AI-generated components won’t have this kind of standardization, especially if they were generated over time by different developers using different tools. If the AI is generating code using the same set of components every time—and you’re already familiar with those components—you’re going to be able to get up to speed quicker and spend less time figuring out what the AI generated.
There’s a solid chance that both your development team and the design team are both using generative AI tools in your work—which can lead to even more painful gaps during the handoff. However, if you’re both telling the AI to work with a specific component library, you can start to bring those disparate experiences closer together. Designers might even be able to start vibe coding prototypes they could hand off to a developer!
Alternately, you could also feed your design system tokens (different kind of tokens) into the AI tool to help it create work in alignment with what already exists. If you’re using a tool like Progress ThemeBuilder, designers can go in and customize exactly how each component should look and behave, and then developers can apply that exported CSS to their AI generated layouts—assuming they’re built with the same components.
You can always prompt your AI generator of choice and hope for the best—but from our experience building UI controls, we’ve found that the results are better when you can provide your model with the right building blocks. That’s why we’ve created a suite of AI code generation tools that leverage the Progress Kendo UI and Telerik component libraries, allowing you to generate new layouts, pages and features built with components you know you can trust.
We believe that AI code generation isn’t a replacement for UI controls that are secure, accessible and human-built. Rather than taking the approach that AI should be used instead, our approach is to see where it can be integrated—to expand the ease of use and capabilities of what we’ve already built.
After all, why throw away a decade of knowledge about building UI controls? For us, it’s the ideal foundation to build on top of.
Kathryn Grayson Nanz is a developer advocate at Progress with a passion for React, UI and design and sharing with the community. She started her career as a graphic designer and was told by her Creative Director to never let anyone find out she could code because she’d be stuck doing it forever. She ignored his warning and has never been happier. You can find her writing, blogging, streaming and tweeting about React, design, UI and more. You can find her at @kathryngrayson on Twitter.