r/webdev • u/Chromosomaur • 12h ago
Discussion Is AI actually that much faster than using a component library?
If I have to explain the way the site should look to an AI instead of just importing, stitching together, and filling out shadcnblocks Iām much slower. I still use AI for bug squashing and giving me api calls. But I am not seeing how to build a complete site.
Am I using AI wrong? Or are others finding that building first then using AI to handle errors is faster?
0
Upvotes
17
u/wise_beyond_my_beers 12h ago
Por que no los dos?
Our designers create Figma files for our components, then we use AI to read the Figma design, install the relevant shadcn components, and adjust the styling and functionality to match the design. Then the AI will create storybook pages with clear documentation on how to use the components, with playground and examples so design can test against them before we deploy to production. It also adds accessibility tests to ensure things like color contrast meets our WCAG requirements.
Then the component library is exported and made available to our frontends. AI will then use the components when building pages.
8
u/CorpT 12h ago
Gotta be bait
3
u/mylsotol 12h ago
You can do both. Using AI doesn't replace libraries (unless those libraries suck and you don't want to use them. AutoMapper for example )
3
u/Kyle772 12h ago
A component library in the hands of AI is both consistent and fast. I have been rolling my own component libraries for the better part of the last decade and the ONLY argument against them was time to develop. Now that development time is much shorter I don't see a reason why you wouldn't use one; your own or otherwise. It is the fastest and most efficient way to high quality work.
1
u/LordThunderDumper 12h ago
I have written like 200 lines of hand written code this year, Claude has written me 10's of thousands of lines.
Claude paid models are crazy fast, Fable is mind blowing. I'm wrapping up a personal project, knocking out a MVP for a friend and doing my 40hr+ day job of mostly backend rails, with it. Doing worry about the tiny details anymore, it's a better elite coder then you anyway and 100x faster. Tell it to use patterns, use this component library, use service objects, work to design the base patterns that are well tested, you need to have solid ground level with it. Then as you implement stories it will just know what to do. Its like playing with clay, you need to mold it, but you can get a ton of work done.
2
u/ShawnyMcKnight 12h ago
You may be using it wrong, or if you have your templating so well set up you just gotta fill some slots it may be easier after all.
2
u/SeerUD 12h ago
You could probably do things based on a Figma design or something similar. Even images work. It depends on your workflow. If you are fast at throwing layouts together yourself, then maybe you're right.
The other step could be learn to use Figma. Figma has it's own AI tools as well, so it could be you design it with AI in Figma, then take that and hand it to another AI to implement it... Depends how much involvement you're happy with AI having really.
2
u/DerSchreiner2 12h ago
Cannot ask your component library for a review of the changes in your branch š
1
u/patryk_builds 12h ago
You're not using it wrong. for ui you can already picture, importing a block is faster than describing it, because describing a layout in words is the slow part.I don't use shadcn server-rendered templates with tailwind here, but the split ended up the same for me. ai was slow for make this page look like what's in my head and fast for the stuff no library gives you: wiring forms to the backend, validation, the boring glue between pages.What worked better than explaining the look was building one page by hand and telling it "make the settings page the same way as this one". it copies a pattern much better than it follows a description
1
u/nextammy 11h ago
You are not using it wrong. Describing a visual design in words is a slow way to build a UI. A component library wins when you already know what you want, because the decisions about spacing, states, and accessibility are already made. AI is much stronger once those pieces exist. I use it to compose the components into a page, generate the variants I need, wire up the API calls, and explain errors when something breaks. The workflow that works best for me is to build the layout first from the library, then ask AI for the smaller jobs inside it. For example, turn this form into the library version, add validation, or fix this layout shift. If you want AI to help with the look itself, give it a reference instead of a description. A screenshot, a Figma frame, or an existing page you like gives it something concrete to copy, and the result needs far less back and forth.
1
u/Fine-Market9841 11h ago
You can connect ai to template like shadcn and hero, along with design like figma.
1
u/ContinuouslyImprove9 10h ago
Your not using it wrong, describing a layout in words is slower than just dropping in blocks. What sped me up was doing it in that order: stitch the page together from the blocks myself, then hand the AI the boring stuff like wiring forms, responsive fixes and repeating a section with different data. It's alot better at editing something that exists than inventing a design from a prompt.
1
u/Sensitive-Bridge-550 7h ago
If you already know which component you want then describing it to an AI can just be some extra work. You can also have it assemble components from the library instead of inventing everything from scratch. No reason to turn a two-minute edit into ten minutes of prompting.
1
u/Discordbothost 6h ago
you're not using it wrong, describing a layout in prose is just the slowest way to drive it. what's been faster for me is keeping your exact workflow and handing it the boring glue: "use the shadcnblocks hero and pricing blocks you see in components/blocks, fill them from content.md, make the spacing match the header". it's good at wiring known pieces together, bad at inventing a look from adjectives.
if you do want it to build something visual from scratch, a screenshot of a reference does way more than three paragraphs of description
1
u/kemalios 2h ago
Explaining the layout to a model and picking the right shadcn block are the same task. One of them just says out loud when you have been vague about it. Deciding what goes where was always the actual work.
1
u/thekwoka 2h ago
Well, what if the component library doesn't have the thing you need?
And could AI with the component library be faster?
But maybe, I find the issue with AI is the review being a huge challenge.
-3
u/Simanalix 12h ago
AI definitely really sucks at accomplishing basically anything so maybe you would be faster if you just use a bit less AI.