diff --git a/contributor-docs/adrs/adr-025-prop-merging.md b/contributor-docs/adrs/adr-025-prop-merging.md new file mode 100644 index 00000000000..b12a6a6ceb2 --- /dev/null +++ b/contributor-docs/adrs/adr-025-prop-merging.md @@ -0,0 +1,114 @@ +# Prop merging conventions + +📆 Date: 2026-07-28 + +## Status + +| Stage | State | +| -------------- | ----------- | +| Status | Proposed ⚠️ | +| Implementation | Pending ⚠️ | + +## Context + +Primer components often set props on an element while also accepting those same +props from consumers. Relying on object spread order alone either replaces +component behavior and styling or prevents consumers from customizing supported +props. Inconsistent precedence also makes component APIs difficult to predict. + +We need one convention for combining component-authored and consumer-authored +props, plus an implementation that applies it consistently. + +## Decision + +Components must intentionally merge any prop that both the component and +consumer can provide. Pass component props first and consumer props second to the +`mergeProps` utility: + +```tsx +