i wanted to ask if Popper.js is absolutely necessary or not if i don't use dropdown menus. Are there any other parts driven by popper that would not work without the library?
Bootstrap 4 Beta - Is Popper.js required?
28.6k Views Asked by AndiLeni At
5
There are 5 best solutions below
0

Popper.js is required IF you're using Bootstrap JS. It's not required if you're using only the Bootstrap CSS.
1

Alternatively, if you only use the non-Popper JS functionality of bootstrap, you can fake Popper and load bootstrap (thus Bootstrap will work and won't throw an error about Popper being missing):
<script>
window.Popper = {}
</script>
<script src="js/bootstrap.min.js"></script>
1

Popper.js is not required if you use bootstrap.bundle.js or bootstrap.bundle.min.js instead of bootstrap.js or bootstrap.min.js. That's because the bootstrap.bundle.* libraries contain popper internally. You can download all the bootstrap files from here
If you search for "popper" in Bootstrap 4's documentation, the following results will come up:
So these are the Bootstrap 4 components that need Popper.js.
Though Popper.js is stated as required for Bootstrap 4, and Bootstrap 4 JS logs an error if it can't find Popper, you can still use Bootstrap 4 JS without Popper, if you don't need tooltips, popovers, dropdowns, nor modals.
For example navbar's JS functionality (mobile menu on the right) works well: