Load only the Bootstrap parts you use
Smaller JavaScript with ES modules.
Bootstrap · Load only the Bootstrap parts you useAdvanced
<script type="module">
import Modal from 'https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/js/dist/modal.js';
import Dropdown from 'https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/js/dist/dropdown.js';
// Popper is required for dropdowns, tooltips and popovers when you do not use the bundle.
new Modal(document.getElementById('m'));
</script>
<!-- Or with a bundler:
import { Modal, Dropdown } from 'bootstrap'; -->modulesimporttree shakingjavascript