Render Flow - Collapse component
Load HTML with collapse markup
Bootstrap JS reads data attributes
Attach click event to toggle button
On click, toggle 'show' class on collapse content
Browser recalculates layout
Animate height from 0 to full height
Render expanded or collapsed content
The browser loads the HTML and Bootstrap's JavaScript detects the collapse toggle button. When clicked, it adds or removes the 'show' class on the content, triggering CSS transitions that animate the content's height, causing the content to expand or collapse visually.