Create responsive layouts quickly with Bootstrap grid, utilities, components, and theming.
Lessons
Hook into show, shown, hide, and hidden events.
Component Events 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 Component Events example in a small scratch file, then explain what changed and why.