When using styled-components with SSR, hydration mismatches occur when client and server generate different class names. Follow this diagnostic guide to identify and fix environment inconsistencies, missing StyleSheet extraction, and StrictMode false positives.
Eliminate React unknown-prop warnings in styled-components by using transient props ($ prefix) and shouldForwardProp to keep custom styling props out of the DOM while preserving dynamic CSS.
Learn how to prevent non-DOM props from leaking into HTML in styled-components. Compare transient $ props and shouldForwardProp for TypeScript safety and SSR consistency.
Transient props in styled-components let you pass styling-only values without leaking them to the DOM. Learn how the $ prefix works, when to use it, and how to avoid common mistakes.