DEV Community

Cover image for Why I don't use Bootstrap anymore.
codedgar
codedgar

Posted on

Why I don't use Bootstrap anymore.

For many web developers, Bootstrap is the way to go when you have to create a Website or App. But in the five years I have making websites, I have found things that made me change my decision of using Bootstrap at all, and I've changed the way I create websites almost completely.

Hi! My name is Codedgar and today I wanted to talk of why I don't use Bootstrap anymore. Since it's a question that students, coworkers, and people, in general, have been asking me a lot recently: Why I don't use Bootstrap?

Let's start with my history (I'm gonna be short, promise C: ) When I started working on frontend web development, the first thing I crossed upon was Bootstrap. And with that, I thought I had frontend developing mastered, it was easy, fast to use and it has a lot of components! Nice!

But as my work progressed and the websites became more and more custom, I started to find Bootstrap a little bit unuseful, and that's when I came to a conclusion as to why I would not be using Bootstrap in my new works.

For easier understanding, I have divided this post in the reasons of why I don't use it, enjoy:

1- Weight
2- Components and Utilities
3- Styling

1- Weight:

"Weight? But Bootstrap is less than 500KB". Yes, I'm aware of that. But let's take on consideration how much of Bootstrap we actually use. And using Bootstrap means that you have to use also jQuery, so if you were to create a landing page with Bootstrap, you would have to use jQuery, Bootstrap CSS, and Bootstrap JS. All of these resources will not be used even in half if you use Bootstrap. And that brings me to my next problem.

2- Components:

"Lack of?" Nope, not at all, is actually the opposite. Bootstrap has so many components and utilities, that you are almost certain to never use even half of them. And you may argue that with NodeJS you can compile and use only the CSS that the website uses, but with plain HTML for a server with Cpanel, this is not possible (At least that I know). So there's this vast quantity of components that you will maybe not use and they will be there anyway.

This is not a problem just of Bootstrap, but of many frameworks I've seen, like Materialize or UiKit, where there are components that most people wouldn't use and there are classes that can be broken down into only one style, like:

.modal-top-left{top:5%;left:5%}

And so on for modal-top-right, modal-bottom-left, modal-bottom-right. If you wanted to change the position of the modal you could totally do it with only one class, adding these classes is just dumb.

3- Styling:

While Bootstrap is easy to use, it's not so easy to customize as you might think. Some components will require you to use !important several times, which is not ideal when creating CSS. And having to override the default styles of Bootstrap is just like having to create your own CSS from start.

What do I use then?

Most people at this point just say " So what? You make CSS from start and don't use any framework?" And well, I don't create my CSS from scratch, and I do use a framework, but only for managing the columns of the website. The framework I use is called Flexbox Grid and it justs comes with columns and rows, nothing more. And it only weights 1.9KB! So, on a website with 1 homepage and 4 subpages, the total CSS (including Flexbox Grid) is only 5KB. For me, that's amazingly fast!

And should I use Bootstrap?

Well, there's something I can't deny and it's that if you need to develop something incredibly fast you can use Bootstrap. And if you are thinking if you should, or should not use Bootstrap, ask yourself:

1- Will I use several components of Bootstrap?
2- Am I in a rush to develop this frontend?
3- Is the design important for this?

If your answers are: Yes, yes, and no; Go ahead and use Bootstrap without shame.

Extra: Do I hate Bootstrap?

Of course not. I think that is amazing to develop websites quicker and easier, but I just would not be using it anymore because I prefer to make my own components and craft almost everything by hand. I know that Bootstrap will live along a still be used by a lot of people, and that's totally fine :)

What do you think? Do you use Bootstrap?

Discussion (148)

Collapse
rolibkk profile image
Roland Heller

It always depends what you want to do. I agree that for a simple web-page there's no need for bootstrap. But there's life after, for those who don't get stuck in developing basic stuff. E.g. we're developing enterprise apps for airlines - revenue management, pricing, inventory management, etc. Your're not going to do that with a simple table but require some solid templates and components. And that's what bootstrap is for.

Collapse
brettsschmidt profile image
Brett Schmidt

A contract value of those prices does not normally come with its own customized templates? It seems weird they would shell out that kind of money and immediately accept that performance hit.

I checked out a couple air line home pages to see:
AA: Modernize/jQuery
Delta: Just Bootstrap.js
United: React (without css framework that I could find)

Collapse
crongm profile image
Carlos Garcia ★ • Edited

In my experience, big contracts and companies often require documented and standardized solutions so the project can be maintained, improved, and fixed easily at any point in its lifetime. No one knows how long a software project will be around, and they know you won't be around forever (they don't want you to, as that would mean spending more money). There is of course a considerable amount of customized work to be done, but using public or private/paid solutions that are easily available and that anyone can pick up is a common practice.

Collapse
thefeorluwarh profile image
Thefeorluwarh Babs

Is it possible to use bootstrap to develop Project management application?

Collapse
rockykev profile image
Rocky Kev

I've built dashboards with bootstrap framework. Overall - it's just a framework. It'll help you lay out your components, and using the utility classes are helpful for a lot of the visual elements in common Project Management software.

If the bottleneck was CSS file size (which it rarely is on the projects I've built), It would be difficult to refactor the project out of bootstrap because of how dependent a lot of the code is on bootstrap. But that's not a con -- it was a fast deployment VS many many more work hours to find all the right visual libraries to display data.

Collapse
expdev07 profile image
ExpDev

I don’t see how not?

Collapse
tayambamwanza profile image
Tayamba Mwanza

One positive about bootstrap is that if another developer needs to modify your code they can understand bootstrap faster than working on custom components since it's got well established rules and docs

Collapse
helleworld_ profile image
Desiré 👩‍🎓👩‍🏫 • Edited

Hello Codedgar;

I've been using lightweight CSS frameworks because I needed the column system they had, discovering Flexbox Grid framework in this article was fantastic!

In the other hand I agree with you... Mostly. Actually I do hate Bootstrap! And it makes me so sad and angry that everyone is teaching Bootstrap to junior programmers as if it was the only way. The only thing I disagree with is that Bootstrap it's "good for fast prototyping".

There are many more frameworks out there designed to prototype easy and faster, such as Bulma CSS, Materialize and even Tailwind (this last one is about utilities but it's escalating so good).

I think those using Bootstrap nowadays probably don't want to try other frameworks or either they can't switch because their projects were built with it from scratch.

Really nice article!

Collapse
slryit profile image
Silvan

Whena coder criticize Bootstrap to suggest Materialize, I stop to read 🙄

Both are frameworks with opinionated designs.

Collapse
helleworld_ profile image
Desiré 👩‍🎓👩‍🏫

Sorry Silvan, but that makes no sense.

First of all I'm not a coder, I'm a fullstack so I also do design, and when I'm forced to use the guides of Google Material to design a product then of course I'll be also forced to use Materialize, and actually its easier than bootstrap.

In another hand, I've suggested 2 more frameworks really easy and fast to use and prototype which are very extended and useful.

Thread Thread
expdev07 profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
ExpDev

fIrST oF iM NOt a cODeR, iM a fULLsTaCK

Thread Thread
helleworld_ profile image
Desiré 👩‍🎓👩‍🏫

...Excuse me?

Thread Thread
satougg4 profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Satougg4

A fullstack is a coder that programs frontend and backend, hence the term. For you to say you're not a coder means you're ignorant of what a fullstack developer does, yet you say it's your profession. Hence, we mock.

Thread Thread
matthewstrasiotto profile image
Matthew Strasiotto

I think that's a little obtuse, @satougg4
To some "coder" carries a tone of derision, or it's seen as reductive- Since it only conveys a small facet of what a developer does.

Personally, I often see it used/misused by people who overestimate their depth of expertise, so for me, it's a red flag.

It's obtuse to assume that because someone wants to clarify that their expertise is not just that "they write code", (but instead they work across a variety of architectures and design and implement systems) means they don't know that their job involves writing code

Read the guys article and figure out for yourself whether he knows what his job involves

Collapse
andevr profile image
drew

Yeah I've looked at bulma. I'm planning to use it in my personal projects. Seems easier to use than Boostrap.

Collapse
helleworld_ profile image
Desiré 👩‍🎓👩‍🏫

It is, absolutely😉, and now it has lots of plugins that include javascript!

Collapse
codesinthedark profile image
Srdjan Mitrovic

Don't use Flexbox Grid framework. It is quick but dirty solution. Let me explain: Years ago people used html table element for page layout but for big projects you should have a separation of content and presentation. That means that for layout people should use CSS but for content HTML. So in your HTML you should have classes like content, article, form, legend, navigation, input, about, menu etc...but in CSS you should have a designer set the layout of those elements/classes by choosigin grid, flex, float or whatever it needs.

But with Flexbox Grid framework you are designing classes to have a predefined layout in HTML, instead of just having class="content" and let that content layout be defined in CSS. I get it, it is quick and convinient but it is wrong in a long run. When you want to change a layout you would need to changee html instead of just changing CSS file. It is not a good practice so we moved away from that a long time ago.

Collapse
sophia_wyl profile image
Sophia Li

I just learned Bootstrap and loved it! I forced myself to use only CSS for a while to make sure I didn't rely heavily on frameworks. This article is super helpful for me because these are issues I didn't consider. Also love how you countered and gave some examples on when it would be optimal to use Bootstrap!

Collapse
expdev07 profile image
ExpDev • Edited

Learn about how to use SASS to extend bootstrap instead of just dropping it due to size. It’s become a really infamous framework due to being abused by beginners, but it’s great if you learn how to use it properly.

Collapse
jhulten profile image
Jeffrey Hulten

I think the point Codedgar was making is that Bootstrap has become a golden hammer. Sometime we allow a tool to become more than it needs to be. Tool developers do this by adding more and more features. User developers do this by using a given tool as an article of faith instead of a intentional decision. 500k overhead for a landing page is a lot!

Thread Thread
expdev07 profile image
ExpDev

That is true. And it has become very infamous among some developers for that reason. However, as I mentioned in another post, you can use sass (which Bootstrap 4 was made with), to manually include components/features that you want (e.g bootstrap-grid). It's extremely easy to customize to your likings through variable or class overrides.

Also, Bootstrap isn't just a tool-- it's a framework, so naturally it will have a lot of features (but again, you can opt-out if you'd like less KBs).

Absolutely, you should understand what CSS is before using Bootstrap. But the points brought up in this article are misleading:

  1. Weight - Solve this with SASS (which is really meant to be used with Bootstrap 4) by importing only features/components that you need. You also don't have to use jQuery. It's completely optional at the expense that you won't be able to use JavaScript based features such as modals, dropdowns, scrollspys, etc.
  2. Components and utilities - See 1.
  3. Styling - Using SASS will allow you to specify overrides without using "!important".
Thread Thread
steventew profile image
Steven Tew

This is exactly what I thought when reading the article, misleading and ill-advised. Bootstrap has been designed and built to address all of the points raised, allowing users to pick and choose, customize and override, flexibility at heart. I could possible argue that it can feel a bit dated at times, and there can be classes that you do not use, but the only way to avoid this, as with any Framework, is to build your own to match your specific needs.

But the biggest negative I find in using any prebuilt framework, is that once its in place in its hard to replace it. Investing time at the start of a project to assess whether or not the framework meets your needs (and future needs) is time well spent.

Thread Thread
lexiebkm profile image
Alexander B.K.

In my next projects that use React, I will need to consider about using these libraries : React-Bootstrap, Antd or Material UI. Maybe a combination of them, depending on certain features that will fit to my needs. In my current app, Bootstrap dominates, although there are already some parts I write using Antd or Material UI.

Collapse
marcusatlocalhost profile image
Marcus

Here are Bootstrap Sass mixins to use gist.github.com/anschaef/d7552885c... and here is a nice article how to use them: medium.com/@erik_flowers/how-youve...

Collapse
lexiebkm profile image
Alexander B.K.

"You also don't have to use jQuery. It's completely optional at the expense that you won't be able to use JavaScript based features such as modals, dropdowns, scrollspys, etc."
When I want to control my modal behaviour, I am forced to use jQuery. because using the attribute of data-toggle doesn't work exactly as I expected. I use modal forms massively, because there are a lot of forms in my app.
For my React based project, there are other alternatives for GUI toolkit other than Bootstrap (React-Bootstrap) such as Antd and Material UI. Currently I use Antd for closable dynamically added tab components; I use Material UI for switch components. The remaining parts are built using Bootstrap.
My app is quite large; it is about KPI management system that I develop alone : from front end to back end. So I don't have enough time to do refinement on the GUI.

Collapse
imcheesecake profile image
Freddie Runnding

That's great! I've been doing my own CSS stuff for I dont know how long and the one thing I've seen the most when people find bootstrap/materialize is that they never learn to understand HOW it actually works. Getting some basic knowledge about CSS will help you in the long run!

Collapse
voughtdq profile image
Douglas Vought

Bootstrap is best used as a framework from which you derive styles. It has a ton of utility features, but something that is big for me is that it is one of the few frameworks that has full-featured accessibility. I just don't have enough expertise to do all the work to make accessible styles on my own. It's easy to focus on the visual aspect of the design while forgetting accessibility. Bootstrap has some guard rails up to remind us.

So I usually end up customizing bootstrap by using the bootstrap SCSS library and preprocessing that with sassc. You can get it down to a few kb by excluding unused styles or by creating your own scss stylesheet.

And these are preprocessing steps that you do on your workstation while you're creating the design, so it works just fine with static HTML.

Collapse
tungdt90 profile image
Tùng Đỗ

I totally agree.
With my personal experience, i always try to customize bootstrap as much as possible, for example: I use my own bootstrap.scss file, exclude all unnecessary components, and customize variable.scss to match with the design.
In doing so, i hardly need to use !important, which is the most should-avoid thing imo.

Collapse
codedgar profile image
codedgar Author

I'm totally gonna test Sass! Can you link a beginner tutorial so I can check it out?

Collapse
leopinzon profile image
Leopinzon

You gotta be kidding, so you’ve never seen sass prior to writing this article?

Thread Thread
codedgar profile image
codedgar Author

I knew what it was, but I haven't used it since most of my work is pure HTML, CSS and JS without anything like NodeJS, React or VueJS so I haven't catch up with CSS preprocessors 🤷🏻‍♂️

Thread Thread
leopinzon profile image
Leopinzon

I’d kindly suggest you to start using it, it is certainly a one way road.

Don’t think of it as something related to node frameworks. If you build front end, it is simply your right hand for writing, organizing and maintaining your CSS at the same time you speed up the development . You can even reuse your own partial definitions within your CSS project as many times as you want, make global variables.... etc. Also you will be able to split your files into components or pages (your choice) without using the CSS @import statement that, as you sure know, triggers new requests to the server, something that is not a very good practice from a page load optimization point of view. The fewer requests, the better.

Customizing bootstrap is something you’ll learn later, but building everything on pure CSS is not efficient for you, and you’ll end up crazy trying to maintain big projects.

Hope it helps :)

Thread Thread
codedgar profile image
codedgar Author

Thanks for the kind answer, I really appreciate it!

I will totally check it out and see how much I can improve my work with it, thanks again! 😄

Collapse
voughtdq profile image
Douglas Vought

First you'll want to install it. There are various implementations. I prefer the one written in C but only because it's the easiest for my environment. Then this guide will walk you through most of what you need to know.

The way I learned how to use SCSS was to reference that guide and then look at Bootstrap's variables and observe how they affected included styles in bootstrap.scss. You'll notice in bootstrap.scss you can comment out the imports you don't need.

Thread Thread
ferdelvalle profile image
Fernando Del Valle

There's an extension for visual studio code called Live SASS compiler that does the trick and it's awfully simple to install.

As for a tutorial, the official site has great documentation and it's, I believe, the best place to start.

Collapse
angularnodejs profile image
AngularNodeJS 🚀 • Edited

If you're using CPanel to develop a website, using Bootstrap is least of your concerns. Most likely, your on a slow host with tons of resources and network speed issues.

jQuery is going away in Bootstrap 5, most CDN already have bootstrap cached for quick download.

If you enjoy fixing CSS compatibility bugs in multiple browsers than by all means roll your own CSS.

Getting new developers to learn "your css" is a waste of time, when most devs already know Bootstrap. So your team productivity will continue to suffer. If they extend your home-grown CSS, the code will just become a horrible mess.

Unless you're a lone ranger dev, using Bootstrap is not a big deal. In fact not using it, is unwise.

Collapse
robertwent profile image
ʇuǝʍ qoɹ

Sounds like you've been loading the full compiled CSS file and then overwriting the styles?
Why don't you use it with sass? It has a huge list of variables you can override to change the output and you can easily remove the parts you don't want to use.
If you use it like that then you hardly have to write any CSS at all and get consistent styling when you decide you want to use another part of it later.

Collapse
codedgar profile image
codedgar Author

From what I know you can not use Sass on a pure HTML project :o

Collapse
expdev07 profile image
ExpDev

Please do research on what you’re writing about before misleading a ton of people... If you go to the official bootstrap documentation, you’ll see that it has an “extending bootstrap” section. You can use sass to only bring in features/components that you need. With this, you can also override variables, so you don’t have to use “important!”. You also don’t have to use jquery, only if you want to use the JavaScript features such as modals or dropdowns.

Thread Thread
codedgar profile image
codedgar Author

My opinions come from 4 years doing websites! And while I agree on the sass part, you need to use jQuery and Bootstrap.js if you want to use the navbar or pretty much anything you want to have a functionality implemented in Bootstrap, so not having it would cut a lot of components out

Thread Thread
expdev07 profile image
ExpDev

You can choose to not import those components (which by the way, aren't that many) or just don't use them when you haven't added jQuery and bootstrap.js. You can also choose to add custom JavaScript (or use another library) and just use that.

Navbar also works perfectly fine without, you just can't use features such as dropdown for hamburger/profile menu, etc.

4 years is a long time without having looked at SASS, which is taken for granted that you know of if you do front end web development.

Collapse
robertwent profile image
ʇuǝʍ qoɹ

I'm not sure what you mean?
SASS is a pre-processor designed to make css easier to write and manage. It compiles sass files to css.
That's why Bootstrap uses it, you can change everything by overriding the variables.

Collapse
slryit profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Silvan

Script kiddie go back to your lessons

Collapse
alexcharlz profile image
Gabriel Anthony

I've never really liked bootstrap from the start. Sure, it's quick to use and all, but overall I've never considered it important or needed either.
In that sense, it's quite annoying, how so many people quickly grab bootstrap, and go on believing they've done the part (frontend).

Very nice article, happy to know am not alone anymore.😅😅

Collapse
gibbitz profile image
Paul Fox

Same here. I worked for an agency once that was fired because they didn't use bootstrap! The client claimed the site couldn't be responsive without it even though we had build client adaptive mobile styling into the custom front end before this conversation even happened.

The problem with frameworks in the industry is that it's driven by marketing either to get the name of an existing tech company into the OSS space or with the hope that a buyout will happen. This leads to the wrong decisions happening when the people choose the tech stack based on hype -- not experience and requirements.

I've had to fight bootstrap layout styles on too many projects in the past 5 years to recommend it to anyone. It was built on naive best-practices from 10 years ago that lead to overly specific selectors and often require !important overrides. If I were releasing bootstrap today, I'd call it '!important'.

Collapse
expdev07 profile image
ExpDev

Then use sass, and bring in only features/components that you need such as the grid??

Thread Thread
gibbitz profile image
Paul Fox

And have negative margins? No thanks. Bourbon and neat were better tools for this, but these days I just write it by hand. Flex box and css grid are supported well enough to not need this anymore anyway. I've used bootstrap mixins from sass for media queries in the past, but was unhappy with the lack of flexibility. Building at responsive (instead of adaptive), every design calls for breakpoints at different queries. As widely used as bootstrap is, css is used by nearly all websites and if developers can't support it that's on them ;)

Thread Thread
expdev07 profile image
ExpDev

Again, everything is customizable. Even the breakpoints. It’s just a matter of overriding the variables.

Collapse
uniibu profile image
uni

For a native Frontend Developer that uses straight-up HTML/JS/CSS or for small projects, you may have some valid points there.
But for a Frontend JS Developer that uses modern Frameworks such as VueJs, React and Angular those points given are no longer a "caveat".

  • Size no longer matters because of the term "Tree shaking". It removes dead/unused codes making the size very small.
  • Js Frameworks allows you to choose only the components that you actually need.
  • And for the CSS, it is pretty much the same, you could pick only the ones you need.
  • Bundlers such as Webpack or Rollup or even Gulp also perform optimizations on your vendor assets.
Collapse
lexiebkm profile image
Alexander B.K.

Especially for a full stack developer, time constraint is one factor that determine whether to use libraries/frameworks or not.
I use React as well as several libraries for data entry, data visualization (charts, gauges) for dashboard and reporting (currently only PDF format). For backend, I use PHP + Laravel, and mySQL for database.
So I cannot spend much time to create GUI from scratch using only HTML and CSS. There are so many other things that need my attention in order that my app run as expected.

Collapse
codedgar profile image
codedgar Author

Totally right! I'm a native frontend developer 😄

Collapse
lprefontaine profile image
Luc Préfontaine • Edited

Given the CDNs available worldwide and intelligent caching done by web engines plus
the amount of memory available to most browser for cache,
I find your point #1 irrelevant. If JS libraries would comply with the Google compiler,
that size could be reduced, the compiler can identify unused code and remove it from the
compilation target. For now it's cheaper for lib maintainers to not jump on that train.

2) Yes and no. The day you need a component and it's not readily available,
you have to jump in some hack to implement it or import it.
Basing your decision on 'I will never need these' is
a short term decision that may come back and bite you.
The only real 'no' here is that you might have to dig to use a component
you don't use often or never used.
Is this worse than hacking something in your shed ?
I don't think so.

3) See 2)....

Collapse
codedgar profile image
codedgar Author

Amazing answer :o

And I agree on you on the main part. But in point 2 I have to say that yes! I prefer making my own things!

This helps me create a component that can match the look and feel of the website completely instead of having to customize an already existing element. And maybe add little details that are not present on Bootstrap.

Some people may say that creating my own components for websites it's not optimal, but that's why I said "I" on the title 😄

Collapse
lprefontaine profile image
Luc Préfontaine

In the context of executing a contract for a customer, you cannot let that happen.
It's already hard to do a decent knowledge transfer, anything out there that is already published
and maintained should be used as much as possible.

I used to like to do my own things in assembler. But it was a different era and because of
limited hardware at the time it was on many occasions a 'logical' choice,
I remember though a customer that refused to buy a C compiler (5k CAD at the time)
for a distributed transactional system.
I ended up coding 40k lines of assembler (and I used macros extensively). 😬
Not a good business decision. This ran for more than 3 years w/o failing before being replaced
by a better business decision.

I and you are not eternal albeit you may have more time left than me (58 here).

Collapse
thomasobale profile image
Thomas Obale • Edited

To be fair, bootstrap 4 was not designed to be used on it's own. It is built with SASS to allow you to only use components you need. JavaScript has advanced far enough that you do not need jQuery to work with the CSS framework.

Collapse
expdev07 profile image
ExpDev

Agreed. Author is just misleading a ton of people, and making claims on a topic it doesn’t really seem like they understand.

Collapse
camerontbelt profile image
Cameron Belt

I totally agree, I wish people would stop using it personally. I see devs using it as a crutch so they do t have to actually learn how anything works or how to do things properly from scratch. I would argue most devs that praise it probably have no real understanding of CSS.

Collapse
slryit profile image
Silvan

The opposite is also true, newly formed coders who are producing cheap websites working on their Safari or Google chrome, incompatibles with the other browsers with totally un-maintainable code.

Collapse
natas7509 profile image
natas7509

Wow! Great post. I'm an Intern and love styling everything from scratch. But here is why I didn't like my last bootstrap experience. My boss asked me to copy an existing landing page that was built in WordPress. He asked me to use BS, "ok cool!". All of the required files to build the page were images that were pre Designed by a graphic designer (I'm sure my boss was testing me) so at the end of the day (2 days) I had built a nice landing page that WASN'T exactly the same as the example, and there was absolutely no way to make it exact due to BS conventions. It got very close, and the boss loved it. But the frustrating part of the project was 1) I ended up with a fairly hefty CSS page with separate and intricate responsive stylings and 2) that type of thing should have only taken me 3 hours at the most. I know that BS is designed for speed and quick prototyping and it was unfortunate that I had to work with images only. I didn't have complete control, and that bugged me.

Collapse
giorgosk profile image
Giorgos Kontopoulos 👀

I will have to agree that bootstrap might be unecessary and even unwanted for smaller project but I would argue also for big or very customized layouts or designs.

A rule of thumb could be that if you find yourself undoing most of the style structures that bootstrap gives you and you are constantly using !important keyword to get things done I think it is time to start considering your life without bootstap.

I would personally use bootstrap only if the job/client required it or if the project was already based on bootstrap and did not want to make a major overhaul. I would probably use a framework for columns/grid but even that is probably not needed.

I find it that in all cases plain old CSS (actually new CSS3) will give you all power and flexibility to create what you need to create exactly what you want to accomplish.

my 2c

Collapse
stelco profile image
Steven Collins

I have used bootstrap for many years. I recently started using React, so now I use react-boostrap. Its great as it allows you to load only the components you need, plus it allows for server side rendering which is ultimately what I was looking for.

Collapse
lexiebkm profile image
Alexander B.K.

Have you tried Antd and Material UI for creating GUI with React ?
When I needed a Switch component that had to be a controlled component, I found that only the one of Material UI that ran as expected.
I use Antd for its Tab component, because it provides example on closable dynamic tabs which I need. React-Bootstrap doesn't provide guide on how to do it. But if I only need static tabs, it is sufficient. So in my app, I use these different libraries to create certain features.

Collapse
stelco profile image
Steven Collins • Edited

Yes we originally used Material UI but I wanted to use a bootstrap library so react-bootstrap was ideal. I am using third party libraries for tabs and for datatables. After a lot of trial and error, this seems to be the best set up for us (so far!)

react-bootstrap.netlify.com/
github.com/jbetancur/react-data-ta...
github.com/YazanAabeed/react-tabs

Thread Thread
lexiebkm profile image
Alexander B.K. • Edited

React-Bootstrap is nice. I will probably use it in my next projects.

For datagrid/table, my requirement is the lib has to provide features as follows :

  1. Inline editing : user can edit data in the grid cell
  2. Row grouping : data can be displayed in hierarchical format to multiple level and still provide inline editing
  3. Fast rendering for thousands of records

For these features, I find two free libraries that I use in my app :

  • ag-Grid : ag-grid.com/react-grid
  • Tabulator : tabulator.info For row grouping, unfortunately, ag-Grid only provides it in its enterprise edition. So for that purpose I use Tabulator which is fully free. There are React versions of both libraries.

As for tabs, I think you may want to consider other libs. The lib you mention only has one contributor, so for me, it is doubtful to be used.
You may try the following :
github.com/reactjs/react-tabs

Furthermore, in case you have never known, there is a site that has a collection of various kinds of React libraries :
github.com/brillout/awesome-react-...

Collapse
jsn1nj4 profile image
JSn1nj4‍‍👨‍💻 • Edited

A lot of projects I end up working with use Bootstrap in some form, just because it comes with a lot of WordPress themes. Personally though, I really like Tailwind.

Collapse
momander profile image
Martin Omander

I agree with the author. For someone like me, who focuses more on the code than the styling, Bootstrap was a godsend in the early days. But over time it got heavier, especially if you used another library to add material design on top of it. Recently I converted a web app from Bootstrap+MDBootstrap to Bulma. The JS bundle size was cut in half, as was the amount of HTML I had to write (and maintain in the future).

Collapse
dantefanabadia profile image
Dante Faña

Well now days you can make customizations to bootstrap super straightforward without use important using the theming approach and import only what you need using sass check it out.

And if you are using framework like react and angular there are open source project that have bootstrap component work without jquery at all like: ngbootstrap and reactbootstrap .

I think there are good alternative. I hope you like.

Collapse
weeb profile image
Patrik Kiss • Edited

3- Is the design important for this?
If your answers are: Yes, yes, and no; Go ahead and use Bootstrap without shame.

So basically you are saying you're can't create a good design with bootstrap?

Sorry, but that's just...well, dumb.

Collapse
codedgar profile image
codedgar Author

I'm not saying you can't do good designs with Bootstrap (You totally can lol), what I'm trying to imply is the fact that if you are going to use Bootstrap and the design will force you to overwrite most of the styles of Bootstrap, you shouldn't use it.

Read the third part (Styling) to know what I mean better 😄

Collapse
adrianjonmiller profile image
Adrian Miller

Your process and conclusion are very similar to my own. What made me abandon Bootstrap was how often I had to write incredibly specific overrides to get the results I wanted. My selectors got more and more specific and required more and more weight to inherit the styles the way I wanted. It also felt disingenuous to apply a generic style library to my client’s sites when my job was to create something custom tailored to their tastes and needs. All that just lead me to the conclusion that bootstrap was not saving me time or making my designs better: the two things it’s supposed to do.

Collapse
sererejegede profile image
sererejegede

One very useful thing to use, especially when I am using Webpack(or alternatives) is something like PurgeCSS. It basically just removes unused CSS.

One major advantage of CSS frameworks is that they make collaboration much easier. Plus marks for accessibility and responsiveness especially when time is a luxury while the major disadvantage would have to be that they often do much more than you need.

Collapse
codedgar profile image
codedgar Author

I saw PurgeCSS a lot of time ago too! I tried to use it but it removed a lot of CSS that wasn't supposed to be deleted, including media querys. I don't know if this was already fixed

Collapse
tomstaveley profile image
Tom Staveley

Have used it before plenty of times without a problem. It could be down to the way you have it configured, as it's not a simple plug and play. You need to ensure you specify all your templates where you reference any CSS.

Collapse
ajmas profile image
Andre-John Mas

The issue I have with bootstrap is that it requires you to tailor your html to bootstrap, which seems a little back to front. The CSS should really be adapting the html.

Additionally, if you start needing to do anything outside the scope of bootstrap then you end up having to workaround any bootstrap assumptions.

Collapse
andrewsmith289 profile image
Andrew Smith

There is also the option to create a customized version of Bootstrap. It involves installing bootstrap with npm/yarn and editing the default Bootstrap scss to exclude whichever components you'd like.

See Klooven's answer for instructions at: stackoverflow.com/questions/457259...

Collapse
petariweb profile image
PGii

I completely agree. There are lot of components what we are not using. Let's say example, we can use flex grid system and cards or sections, so why we just get the Flex Grid System with variables for responsiveness and type our own sass/css for Cards, Sections, Articles ...

it's not so bad to type 500 lines sass/css code for components only what we are using or at least borrow from bootstrap only that comps what you need.

Collapse
thumbone profile image
Bernd Wechner • Edited

I think your concern with weight warrants a little exploration personally. There are a few different concerns bundled in that idea.

A very common one of course (albeit not the only concern) is the download cost. But it behooves us to note that using a very popular library and linking to it from a very popular source is popular precisely because it addresses this concern, engaging the strong likelihood that the library is already cached, by virtue of its ubiquity and popularity.

Collapse
twit96 profile image
Tyler • Edited

One of my friends began web development with bootstrap, whereas I spent several months learning vanilla CSS when I started web development. I helped him solve a problem on a project he was working with a couple months ago, and he didn't have much idea of how CSS worked. His needs exceeded bootstrap, and the classes he had patchworked together were not giving him the expected result. I put together a custom CSS class in a couple minutes for what he needed, and he told me "I hate CSS so much". As soon as my class worked the way he wanted it, he closed the file and said he wasn't looking at it again. It was all lighthearted, but he was frustrated for sure.

I do not advocate for relying on Boostrap unless you're on a time crunch and new to CSS. You'll still have to spend time reading their documentation or looking for Bootstrap tutorials, so after a certain point, I think you should put in the time to learn CSS. Knowing how to use bootstrap is not the same as knowing how to program CSS, and the framework can bog you down easily if you have custom needs for your project. If Bootstrap can get your footing in CSS while you're learning, awesome! But treat it like training wheels.

Collapse
arshamaazami profile image
arsham-azami

Hi codedgar
Bootstrap is a useful ui framework work but as you mention, bootstrap has so many components and utilites that when we install it we do not even use half of them and they will be there anyway
for building a simple web page or website it is not necessary to use it or when you want to build your own component or costume styling
But in my opinion bootstrap is a great framework for building large-scale applications and many famous app use bootstrap like udemy, and Spotify and Twitter

Collapse
weirdmayo profile image
Daniel Mayovsky

Well, from the productivity standpoint, writing your own hamburger menu's and making them all appear correctly on mobile, tablet and others...

Making the sidebars, dropdown components that work on mobile correctly, and all the other things that a simple app might need.

Rewriting these things instead of using the framework is almost the same as inventing the wheel all over again. I use Bulma, which is lighter and more opinionated than Bootstrap, doesn't provide atomic classes, and anything on that level of case-to-case usage. But it does provide modules that you won't use on a simple website.

Anything beyond a landing page requires an efficient developer to use a framework. Especially when you are working alone on the project, playing around with hamburger menus is just a plain waste of time.

Collapse
codedgar profile image
codedgar Author

I totally agree on everything you said! That's why I said that if you want to develop something fast you can totally use Bootstrap!

Collapse
ed1nh0 profile image
Edson Jr.

Leaving aside the purpose of the article, I'll disagree with you on item 3. Since BS 4.x and the adoption of SASS pre-processor the theming and customization issues turns it far more easy to deal with. The use of the !default flag for ALL available variables made it pretty easy to config for everyone needs. They still use jQuery for all the behaviors indeed but I think it's a matter of time to get rid of it.

Collapse
biz941 profile image
biz94

Lovely Indeed the article is. I have been developing world class apps and software and would like to say If you are a Beginner / Non UX familiar / Front Desk Operator then bootstrap is for you.

If you know the Pixels and the Density and the Mobile / Desktop / Web works then write your own framework. Never depend on frameworks they close down in time. Write the Native language. So write your own framework, it could be done in few lines for world class products.