Create responsive layouts quickly with Bootstrap grid, utilities, components, and theming.
Lessons
Control components from your own JavaScript.
Programmatic JavaScript API is easiest to learn by reading the example, changing it, and observing the result.
// Programmatic control of a Bootstrap component
const modalEl = document.querySelector('#demoModal');
const modal = new bootstrap.Modal(modalEl);
modal.show();
modalEl.addEventListener('hidden.bs.modal', () => {
console.log('Modal closed');
});Practice the Programmatic JavaScript API example in a small scratch file, then explain what changed and why.