Render Flow - Horizontal collapse
Read <button>
→Create BUTTON node
Read data-bs-toggle="collapse"
→Bootstrap JS attaches event
Read data-bs-target="#collapseExample"
→Link button to collapse div
Read <div id="collapseExample" class="collapse">
→Create DIV node with collapse class
Initial state: div hidden width=0
On button click
→Toggle div width from 0 to full
Repaint and reflow to show/hide content horizontally
The browser reads the button and collapse div, Bootstrap JavaScript listens for clicks on the button, then toggles the width of the target div from zero (hidden) to full width (visible), causing a horizontal expand or collapse animation.