At most one component library family
Why it matters
Running MUI alongside Chakra ships two theme providers, two sets of primitives, two typography scales, and often two CSS-in-JS runtimes to every page. Bundle size roughly doubles for the styled-component portion of your app, Core Web Vitals degrade on mobile, and designers cannot produce a coherent visual system because every component comes from a different opinionated foundation. Dark mode toggles typically work in one library and break in the other.
Severity rationale
Medium because the impact is bundle bloat and visual drift rather than correctness or data loss, though both affect production quality.
Remediation
Audit usage with grep -rl "from '@mui/material'" src/ | wc -l and the equivalent for the other library, then port the smaller side. Remove the loser's peer dependencies in one step: npm uninstall @chakra-ui/react @emotion/react @emotion/styled. Delete the provider wrapper from src/app/layout.tsx or src/providers/index.tsx and verify theme tokens now flow from a single source. Run a production build and confirm the removed library is no longer in the bundle analyzer output.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Multi-Session Drift Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
Taxons
History
- 2026-04-18·v1.0.0·Initial import from ai-slop-code-drift·automated
- 2026-04-20·v1.1.0·Add Phase 6.0 detect-rg snippet for component-library import detection·by cakleinman