Performance: Active variant
MEDIUM IMPACT
This affects the browser's rendering performance during user interactions, especially when the active state triggers style changes.
<button class="bg-blue-500 active:bg-blue-700 transition-colors duration-150">Click me</button><button class="bg-blue-500 active:bg-blue-700 active:shadow-lg active:text-xl transition-all duration-150">Click me</button>| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Active variant with color change only | Minimal | 0 | Low | [OK] Good |
| Active variant with font-size and shadow | Minimal | 1+ per toggle | High | [X] Bad |