Import & Export
XBuilder allows you to export your popup configurations as JSON and import them later or on other projects. This is useful for backups, sharing templates, and moving popups between environments.
Exporting Popups
How to Export
- Click Export in the header
- Choose export format
- Download or copy the file
Export Formats
| Format | Use Case |
|---|---|
| JSON | Full configuration (recommended) |
| HTML | Standalone HTML output |
What's Exported
The JSON export includes:
- All elements and content
- Styling settings
- Layout configuration
- Trigger settings
- Display frequency
- All customizations
Export JSON Structure
Basic Structure
{
"popup": {
"position": "center",
"width": "500px",
"backgroundColor": "#ffffff",
"borderRadius": "16px",
"animation": "fadeIn",
"trigger": "onload",
"elements": [...]
},
"meta": {
"version": "1.0",
"exportedAt": "2024-01-15T10:30:00Z"
}
}
Elements Array
"elements": [
{
"id": "heading-1",
"type": "heading",
"content": {
"text": "Welcome!",
"level": "h2"
},
"style": {
"typography": {
"fontSize": "32px",
"fontWeight": "700"
}
}
},
// More elements...
]
Importing Popups
How to Import
- Click Import in the header (or Library → Import)
- Select JSON file or paste JSON
- Click Import
- Review loaded popup
Import Options
| Option | Effect |
|---|---|
| Replace | Replaces current popup |
| Merge | Adds to current elements |
What's Imported
When importing:
- All settings are applied
- Elements are recreated
- Styles are restored
- Triggers are configured
Copy/Paste Templates
Paste JSON Directly
You can paste JSON templates directly:
- Copy JSON configuration
- Click on canvas (ensure focus)
- Press
Ctrl+V/Cmd+V - Confirm import
Canvas Paste
When pasting in the canvas area:
- XBuilder detects JSON format
- Prompts to import as template
- Replaces current content
Backup & Restore
Creating Backups
- Export your popup as JSON
- Save with descriptive filename:
popup-newsletter-2024-01-15.json - Store in safe location
Restoring from Backup
- Open XBuilder
- Import the backup JSON
- Verify content loaded correctly
Backup Schedule
Recommended:
- Before major changes
- Weekly for active projects
- After completing designs
Sharing Templates
Sharing with Team
- Export popup as JSON
- Share file via:
- Cloud storage
- Version control
Template Library
Build your own library:
/templates
/newsletters
- welcome-popup.json
- exit-intent.json
/promotions
- flash-sale.json
- discount-offer.json
Version Control
Git Integration
Store templates in git:
git add templates/
git commit -m "Add newsletter popup template"
Change Tracking
JSON files work well with git:
- See changes in diffs
- Track modifications
- Revert if needed
Migration
Between Environments
Moving popup from development to production:
- Export from dev environment
- Import to production
- Update any environment-specific settings
Between Projects
Reuse popups across projects:
- Export proven templates
- Import to new project
- Customize for new context
Troubleshooting
Import Failed
Check:
- JSON is valid (use JSON validator)
- File not corrupted
- Correct file selected
Missing Elements
Check:
- Export was complete
- No JSON truncation
- Compatible XBuilder version
Styling Differences
Possible causes:
- Font not available
- Browser differences
- CSS conflicts
Validation Errors
If JSON is invalid:
- Use online JSON validator
- Check for syntax errors
- Look for trailing commas
- Verify quotes are correct
Best Practices
File Naming
✓ popup-[name]-[date].json
✓ newsletter-signup-v2.json
✓ black-friday-2024.json
✗ popup.json
✗ test.json
✗ final-final-v3.json
Before Exporting
- Test popup thoroughly
- Remove test/debug settings
- Verify all content is correct
- Check responsive behavior
Before Importing
- Backup current work
- Verify JSON source
- Check compatibility
- Have rollback plan
JSON Editing
Manual Editing
You can edit exported JSON:
{
"popup": {
"backgroundColor": "#000000" // Change this
}
}
Caution:
- Maintain valid JSON structure
- Don't change IDs arbitrarily
- Test after manual edits
Batch Updates
For bulk changes:
- Export multiple popups
- Use script to modify JSON
- Import updated versions
Related Features
- Templates — Pre-built templates
- Custom CSS — Style customization
- Keyboard Shortcuts — Quick actions