Performance: Input groups
MEDIUM IMPACT
Input groups affect page load speed and rendering performance by adding extra DOM elements and CSS styles around form controls.
<input type="search" class="form-control" placeholder="Search" aria-label="Search input">
<div class="input-group"> <span class="input-group-text"><i class="bi bi-search"></i></span> <input type="text" class="form-control" placeholder="Search"> </div>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Input group with wrappers and icons | More nodes (3+ per input) | 2 reflows per input group | Higher paint cost due to complex styles | [X] Bad |
| Simple input without wrappers | Minimal nodes (1 per input) | 1 reflow | Lower paint cost | [OK] Good |