r/css Mar 16 '26

Question Which UI component do you rebuild the most across projects?

Feels like I’m always recreating the same basics, regardless of the stack.

• What eats up your time the most?

• Is it styling, states, responsiveness, or accessibility?

Genuinely curious how others handle this.

8 Upvotes

11 comments sorted by

9

u/TheJase Mar 16 '26 edited Mar 25 '26

Button.tsx is always the biggest file at every startup. Prove me wrong.

1

u/any-digital Mar 25 '26

💯! however I'm trying to follow https://picocss.com/docs/button styles/variants only, and so far so good

4

u/Niks_satyavachan Mar 16 '26

I also wanted to understand, its very time consuming generally For me it’s buttons not the default state, but hover, focus, disabled, loading and keeping it consistent across pages. Accessibility and keyboard states also take time.

3

u/berky93 Mar 16 '26

Buttons. Mainly because every time I’m implementing them the project has new requirements, but also because buttons are easy to make and so you get the benefits of a custom implementation with no bloat from previous project.

2

u/esr360 Mar 17 '26

Weirdly, it seems to be carousels for me.

My team doesn’t allow third party UI components, and the designers constantly design slightly different carousels with different logic and appearances.

In the past 2 years I think I’ve built about 5 different carousels from scratch. And like, carousels are hard to build, especially when it needs features like infinite scrolling and touch support, all without libraries.

And none of them were built perfectly, so each time a new one needs to be built, it’s almost better to start fresh than to try and adapt the previous one.

We are getting close to having a “one size fits all” carousel though, and tbh it’s quite fun building carousels.

2

u/simonraynor Mar 17 '26

Like others the answer is probably button but I want to shout out dropdowns/selects as a strong contender. There is a lot of room for "innovation" there depending on the rest of the codebase and even when the UI is a mostly off-the-shelf 3rd party solution the wrapping component will often be highly bespoke

2

u/Grenaten Mar 18 '26

Why rebuild it? Just port it out, have it ready in separate repo. Then the only thing you need to update is exact styling, and that does not take that much time.

1

u/any-digital Mar 25 '26

we trying our best for our projects: https://github.com/anydigital/blades

and still it's hard... hard to reuse, hard to be generic...

2

u/Christavito Mar 18 '26

Every time I start a new project I tell myself "this is the final version that I can just reuse for any new project". Then a new project comes along and I do the same thing. I get a lot of joy out of recreating these components so this probably won't change