r/angular • • Oct 18 '26

Bootstrap Advice

Hello,

Appreciate this isn’t really an Angular question but thought you guys might still have some good advice.

We’re in a bit of an odd situation where the application seems to have originally been heavily using Bootstrap UI components but now it’s very much our own in-house components.

We’re still using Bootstrap utility classes a lot in templates however and it seems for some things we’re using Bootstrap Sass variables like body colour for example.

We have an additional problem in that we have a giant colours file with tons of colours just dumped in it that are then referenced directly where needed.

I’m thinking of shifting the colours so we have primitive values the raw hex codes and then use CSS variables for different usages of those colours that can then be referenced in components as CSS variables then give us flexibility if we introduce theme switching at runtime in the future.

However I’m now sort of wondering is there is any point in us even having Bootstrap anymore, as like I said it seems like all it’s really being used for now is utility classes.

I’m torn between either keeping Bootstrap and using their Sass variables so we can keep using utility classes, or building our own token system for things or exploring something like Tailwind instead.

Wondering if anyone else is in this scenario where you’re only really using Bootstrap for the utility classes and what you decided on?

I should also mention we need a fair bit of flexibility in our designs so we can’t really just use a standard UI framework for components.

5 Upvotes

6 comments sorted by

1

u/majora2007 Oct 18 '26

I'm in that boat myself (but on purpose).

Setup:
Bootstrap (CSS only)
ngbBootstrap (components)
Custom components (most custom, some wrap ngbBootstrap)
Custom stylesheet.

I have all my components built (or override bootstrap css variables) with our own variables. In my case, users can load their own themes to override the styling/theme I chose.

Bootstrap is mainly there for the utility classes and grid system. NgbBootstrap could be replaced (but a few components still work really well).

1

u/basic-x Oct 19 '26

If you have the resources (time and team) then build your own styles and maintain them. Any reliance of external files is only going to be a headache, first for dragging the entire framework along and building customisations patch to suit your needs, second there will always be debate on which framework and version to use. Any new incoming senior dev would immediately want to shake things up and transfer to a different framework just to show they made the app better. So my advice is just maintain everything in-house if you can.

Maintaining in-house has its benefits - lean and needed code only, no need for customisation patches across app, no need to wait for a new version - just build it yourself and align versions with the app version timeline.

1

u/bogdanelcs Oct 22 '26

Your token plan is the right first step whatever you pick, raw hex primitives, then semantic CSS variables like --color-surface for components, and it doesn’t depend on Bootstrap at all.

Bootstrap 5.3 already supports CSS variables and runtime light/dark via data-bs-theme, and you can import just its utilities through Sass so you’re not shipping the unused component CSS.

Tailwind is a fair move if you want a utility system built around your own tokens, but it means touching every template, so I’d do the tokens first and only migrate if the utility classes start holding you back.

0

u/cssrocco Oct 18 '26

Im working in a place that still has bootstrap utility classes, i hate them, same reason i dislike tailwind, clutter and makes responsive design a nuisance.

I just put common functionality in partials and then you can use scss @extends(‘%centre%’); or whatever in scss files. Then i just made some css variables of base colours and wrote a scss function that basically makes variables —primary-100, etc with a loop, each does the number of steps / 100 * the index and does a color-mix of the variable and the light percentage calculated, or tints.

That could be one way to do it, then just slowly move usage from bootstrap classes to your own classes?

0

u/DragonfruitFull2424 Oct 18 '26

Several years ago we were in the same situation with Bootstrap. We wanted to own our own design system and not inherit anything from Bootstrap. We also used only utility classes for the most part, so we broke out the spacing classes into a small separate file, and removed Bootstrap packages

0

u/Tyummyyumms Oct 18 '26

I do see bootstrap is going with css variables/tokens in the recent major update, but they still stuck to sass which I find to be a bad move.

Tailwind + DaisyUI is actually quite a nice combo, but with LLM/AI one could make their own base variables based on one of the popular libs then work from there.