title: Why Does Bootstrap Require jQuery?
body: <p>I have googled this question numerous times and never found a satisfactory answer.  Most answers seem only to say that &quot;<a href="https://stackoverflow.com/questions/11526594/does-twitter-bootstrap-include-jquery">yes, Bootstrap plugins do require jQuery</a>&quot; or &quot;<a href="https://stackoverflow.com/questions/14608681/can-i-use-twitter-bootstrap-without-jquery">yes, you can use BS without jQuery if you don't use the plugins</a>&quot;.  Bootstrap's reliance on jQuery (as described in their <a href="https://getbootstrap.com/docs/4.0/getting-started/introduction/#quick-start" rel="nofollow noreferrer">quick start</a>) strikes me as a poor design decision, for at least the following reasons:</p>
  <ol>
  <li>jQuery is quite a large and bloated framework, and now any site using BS plugins will have to download it.  Granted, BS users can use the slim/minified builds (<a href="https://blog.jquery.com/2016/09/22/jquery-3-1-1-released/" rel="nofollow noreferrer">unless they want to use jQuery AJAX</a>), but even those add not-insignificant load time for a library that may not be used by anything but Bootstrap.</li>
  <li>jQuery in general seems to be falling out of favor lately, as frameworks like Angular and React grow more popular (see <a href="https://insights.stackoverflow.com/trends?tags=jquery%2Cangularjs%2Cangular%2Creactjs" rel="nofollow noreferrer">StackOverflow trends</a>).  I know old != bad, and jQuery is still almost ubiquitous on the web, but why did the BS developers choose to rely on an over-decade-old framework?</li>
  <li>Simply requiring jQuery to be <code>&lt;script&gt;</code>ed in before BS does not allow for very clear dependency resolution with modern bundlers like Webpack and SystemJS.  Again, why didn't they use some kind of module-based dependency?</li>
  <li>But most importantly, in my opinion: why did the BS developers choose to rely on a JS framework at all??  In this wonderful age of standards-compliant browsers, most of jQuery's features can now be accomplished <a href="http://youmightnotneedjquery.com/" rel="nofollow noreferrer">with vanilla HTML/CSS/JS</a>.  We all know that when creating a software package/library of any kind, we should try to remove additional dependencies whenever feasible, because users want <em>that package</em> and not a bunch of other additional fluff.</li>
  </ol>
  <p>So is there some reason, then, that the BS devs chose to rely on jQuery, in spite of all of the above?  I probably could've just asked the BS devs directly with an Issue on their GitHub page, but I hoped that an SO question would be more accessible to future googlers with these questions.</p>
  <p><strong>Update Jan 2019:  According to the <a href="https://blog.getbootstrap.com/2020/06/16/bootstrap-5-alpha/" rel="nofollow noreferrer">Bootstrap docs</a>, v5 is dropping the jQuery dependency, so hopefully that will arrive soon.</strong></p>
  <p><strong>Update May 2021:  Bootstrap v5 is out! As promised, this version has dropped jQuery, as described in the <a href="https://blog.getbootstrap.com/#javascript" rel="nofollow noreferrer">release blog post</a>.</strong></p>