Design System Problems

Component Wrapper Anti-Pattern

January 15, 2026 • 5 min read

Component Wrapper Anti-Pattern

Component wrapper anti-patterns occur when wrapper components around design system components introduce problematic modifications that cause drift or maintenance issues. While wrappers can be legitimate extension mechanisms, certain wrapper patterns create more problems than they solve.

What Is the Component Wrapper Anti-Pattern

The wrapper anti-pattern involves creating components that wrap design system components in ways that undermine design system value. Anti-pattern wrappers might override design system styling, modify component behavior inappropriately, break component APIs, or create maintenance burdens through tight coupling.

Not all wrappers are anti-patterns. Wrappers that add functionality without modifying underlying components, that maintain component contracts, and that compose cleanly are legitimate patterns. The anti-pattern designation applies to problematic wrapper implementations.

How Component Wrapper Anti-Patterns Manifest

Style override wrappers apply CSS that modifies wrapped component appearance. These wrappers might add classes that override design system styles or use inline styles that change visual properties. Style override wrappers create drift by making components look different than design system specifications.

Prop interception wrappers modify or filter props before passing them to wrapped components. They might transform values in unexpected ways, filter out props consumers intended to pass, or add props that change component behavior. Prop interception breaks API contracts.

Behavior modification wrappers alter how wrapped components behave. They might suppress events, modify state updates, or intercept user interactions. Behavior modification creates components that look like design system components but act differently.

Maintenance burden wrappers become problematic through tight coupling to implementation details. When design system components update, these wrappers break because they depend on internals rather than stable APIs. Maintenance burden compounds over time.

Shadow API wrappers present different APIs than wrapped components. Consumers learn the wrapper API rather than the design system API. When wrappers are eventually removed or when consumers use unwrapped components elsewhere, they face API confusion.

Key Considerations

Common Questions

How can teams distinguish legitimate wrappers from anti-patterns?

Evaluation criteria help distinguish patterns from anti-patterns. Legitimate wrappers: maintain wrapped component visual appearance, preserve component API contracts, add functionality without modifying core behavior, depend only on stable public APIs, and can be removed without fundamentally changing consumer code. Anti-pattern wrappers: override wrapped component styling, break or shadow component APIs, modify behavior in ways inconsistent with design system intent, depend on implementation details that may change, and create consumer code that cannot easily adopt unwrapped components. Applying these criteria to existing wrappers identifies which need attention.

How should organizations address existing wrapper anti-patterns?

Addressing anti-patterns requires systematic approach. Inventory identifies existing wrappers across codebases. Evaluation assesses each wrapper against anti-pattern criteria. Prioritization focuses attention on most problematic wrappers first. Remediation options include refactoring wrappers to legitimate patterns, migrating consumers to unwrapped component usage, or incorporating needed functionality into design system components. Migration support helps consumers transition from problematic wrappers. Prevention through guidelines and review ensures new wrappers avoid anti-patterns.

Summary

Component wrapper anti-patterns involve problematic wrapper implementations that override styles, intercept props inappropriately, modify behavior, create maintenance burden, or shadow APIs. Legitimate wrappers maintain visual appearance, preserve APIs, add functionality cleanly, and depend only on stable public interfaces. Evaluation criteria distinguish patterns from anti-patterns. Addressing existing anti-patterns requires inventory, evaluation, prioritization, and remediation through refactoring, migration, or design system enhancement.

Buoy scans your codebase for design system inconsistencies before they ship

Detect Design Drift Free
← Back to Component Drift