Overview
Overrides let you customize the content of a component instance in an email while keeping its design linked to the master component. This is the mechanism that connects components in your library to instances in emails.The Core Concept
Master Component
In the library
- Fixed design
- Fixed structure
- Source of truth for styles
- Update once, all instances update
Instance in Email
In your email
- References the master
- Can override content
- Design inherited from master
- Content can be customized
What Can Be Overridden?
Overrides allow you to customize content, not design:✅ Overridable (Content)
✅ Overridable (Content)
- Text content: The text inside text elements
- Image URLs: The source URL of images
- Links: URLs for buttons and links
- Alt text: Description for images
❌ Not Overridable (Design)
❌ Not Overridable (Design)
- Colors (come from Style Library tokens)
- Font sizes (via Text Styles)
- Spacing (padding, margin)
- Borders
- Background colors
How it Works
When you add a component to an email:- Instance: A reference to the master component is created.
- Overrides: You can click on text or images within the component to change them for this specific email.
- Design Link: The styling (colors, fonts, layout) remains locked to the master component.
Real-World Example
Let’s say you have a “CTA Button” component in your library. Master Component:- Text: “Click here”
- Color: Orange
- Padding: Large
- You change text to: “Get Started”
- You change link to:
https://myapp.com/start - Result: An orange button that says “Get Started”.
- You change text to: “Buy Now”
- You change link to:
https://myapp.com/buy - Result: An orange button that says “Buy Now”.
- You edit the Master Component color to Blue.
- Both emails automatically update to show Blue buttons, but keep their unique text (“Get Started” and “Buy Now”).
Modifying the Master Component
Content overrides (your custom text and links) are preserved when the master is updated. Only the design changes.
Best Practices
Limit overrides to content
Limit overrides to content
Only override content properties (text, URLs). For design variants, create separate components or use different style tokens.
Test after master changes
Test after master changes
After modifying a master component, check a few emails using it to ensure everything still looks correct.
Document usage
Document usage
If a component is meant to be customized in a specific way, note it in the component description.
