atm

Atomix

v0.4.6

    1. Home
    2. Guides
    3. Theme Comparator

Getting Started
  • Introduction
  • Installation
  • Quick Start
  • Migration Guide
  • CLI Reference
Design Tokens
  • Overview
  • All Tokens
  • Colors
  • Spacing
  • Typography
  • Grid
  • Elevation
Styles System
  • Architecture
  • Customization
  • Utilities
  • API Reference
Layouts
  • Grid System
  • Masonry Grid
  • Responsive Patterns
  • Customization
  • Performance
Components
  • Overview
  • Guidelines
  • Accordion
  • AtomixGlass
  • Avatar
  • Badge
  • Breadcrumb
  • Button
  • ButtonGroup
  • Card
  • Checkbox
  • Date Picker
  • Dropdown
  • Form
  • Input
  • Modal
  • Progress
  • Radio
  • Rating
  • Select
  • Slider
  • Spinner
  • Tab
  • Textarea
  • Toggle
  • Tooltip
  • Upload
  • Block
  • Callout
  • Countdown
  • Hero
  • Icon
  • List
  • Messages
  • Navbar
  • Pagination
  • Popover
  • Steps
  • SectionIntro
  • Container
  • Grid
  • GridCol
  • Row
  • River
  • MasonryGrid
  • DataTable
  • EdgePanel
  • SideMenu
  • Nav
  • NavItem
  • NavDropdown
  • VirtualizedGrid
Guides
  • Theming Guide
  • AtomixGlass Performance
  • AtomixGlass Theming
  • Theme Studio
  • Devtools
  • Theme Inspector
  • Theme Preview
  • Theme Comparator
  • Live Editor
  • CLI Tool
  • Try Live Editor
  • Try Inspector
  • Try Preview
  • Try Comparator
  • AtomixGlass Playground
Examples
  • Common Patterns
  • Landing Page
API Reference
  • React API
  • JavaScript API
  • CSS API
CLI
  • Overview
  • User Guide
  • API Reference
  • Migration Guide
  • Security Guide
Resources
  • Roadmap
  • Changelog
  • Contributing

Atomix Design System

A comprehensive design system for building modern, accessible, and performant web applications with React and vanilla JavaScript.
GitHubTwitterDiscordNPM

Getting Started

IntroductionInstallationQuick StartTheming Guide

Documentation

ComponentsDesign TokensStyles SystemLayouts

Resources

GitHub Repository↗NPM Package↗Storybook↗API Reference

Community

ContributingRoadmapChangelogReport Issue↗

© 2026 Atomix Design System. Built with ❤️ by the Shohojdhara.

Side-by-side theme comparison with difference highlighting

Theme Comparator

Compare two themes to identify differences, track changes, and ensure consistency across theme versions.

Theme Comparator Component

ThemeComparator provides detailed side-by-side comparison of two themes with difference highlighting, statistics, and filtering capabilities.

Overview

The ThemeComparator component analyzes two themes and displays their differences in an easy-to-understand format. It's essential for version control, A/B testing, and ensuring theme consistency.

✨ Try it now: Interactive Comparator Example — Compare two theme versions side-by-side.

Key Features

  • Side-by-Side Comparison - View both themes simultaneously
  • Difference Highlighting - Visual indicators for added, removed, and changed values
  • Statistics Dashboard - Summary of changes and differences
  • Detailed Value Comparison - Deep comparison of all theme properties
  • Path-Based Tracking - Track changes by property path
  • Filter Options - Show only differences or all properties

Basic Usage

Simple Comparison

TSX
1import { ThemeComparator } from '@shohojdhara/atomix/theme/devtools'; 2import { createTheme } from '@shohojdhara/atomix/theme'; 3 4const lightTheme = createTheme({ 5 name: 'Light Theme', 6 palette: { 7 primary: { main: '#2196f3' }, 8 background: { default: '#ffffff' }, 9 }, 10}); 11 12const darkTheme = createTheme({ 13 name: 'Dark Theme', 14 palette: { 15 primary: { main: '#90caf9' }, 16 background: { default: '#121212' }, 17 }, 18}); 19 20function App() { 21 return ( 22 <ThemeComparator 23 themeA={lightTheme} 24 themeB={darkTheme} 25 showOnlyDifferences={false} 26 /> 27 ); 28}
28 lines579 characters

Show Only Differences

TSX
1<ThemeComparator 2 themeA={currentVersion} 3 themeB={newVersion} 4 showOnlyDifferences={true} 5/>
5 lines96 characters

Props API

PropTypeDefaultDescription
themeAThemeRequiredFirst theme to compare
themeBThemeRequiredSecond theme to compare
showOnlyDifferencesbooleanfalseShow only properties that differ
classNamestring-Custom CSS class name
styleCSSProperties-Inline styles object

Difference Types

Visual Indicators

AddedProperty exists in Theme B but not in Theme A
RemovedProperty exists in Theme A but not in Theme B
ChangedProperty exists in both but with different values

Statistics Dashboard

The comparator displays summary statistics:

  • Total number of properties compared
  • Number of added properties
  • Number of removed properties
  • Number of changed properties
  • Number of unchanged properties
  • Percentage of differences

Advanced Examples

Version Comparison Tool

Compare theme versions before releasing updates:

TSX
1import { ThemeComparator } from '@shohojdhara/atomix/theme/devtools'; 2import { useState } from 'react'; 3 4function VersionComparison() { 5 const [showOnlyDiffs, setShowOnlyDiffs] = useState(true); 6 7 return ( 8 <div> 9 <div className="controls"> 10 <h2>Theme v1.0 vs v2.0</h2> 11 <label> 12 <input 13 type="checkbox" 14 checked={showOnlyDiffs} 15 onChange={(e) => setShowOnlyDiffs(e.target.checked)} 16 /> 17 Show only differences 18 </label> 19 </div> 20 21 <ThemeComparator 22 themeA={themeV1} 23 themeB={themeV2} 24 showOnlyDifferences={showOnlyDiffs} 25 /> 26 27 <div className="release-notes"> 28 <h3>Breaking Changes</h3> 29 <p>Review removed or significantly changed properties</p> 30 </div> 31 </div> 32 ); 33}
33 lines822 characters

A/B Testing Dashboard

Compare theme variants for A/B testing:

TSX
1function ABTestingDashboard() { 2 const variantA = createTheme({ 3 name: 'Variant A', 4 palette: { primary: { main: '#2196f3' } }, 5 }); 6 7 const variantB = createTheme({ 8 name: 'Variant B', 9 palette: { primary: { main: '#f44336' } }, 10 }); 11 12 return ( 13 <div className="ab-testing"> 14 <h2>A/B Test: Primary Color Impact</h2> 15 16 <ThemeComparator 17 themeA={variantA} 18 themeB={variantB} 19 showOnlyDifferences={true} 20 /> 21 22 <div className="test-results"> 23 <h3>Test Metrics</h3> 24 <p>Track conversion rates for each variant</p> 25 </div> 26 </div> 27 ); 28}
28 lines621 characters

Migration Helper

Compare old and new theme structures during migration:

TSX
1function MigrationHelper() { 2 return ( 3 <div className="migration-tool"> 4 <h2>Migration from v1 to v2</h2> 5 6 <ThemeComparator 7 themeA={legacyTheme} 8 themeB={modernTheme} 9 showOnlyDifferences={true} 10 /> 11 12 <div className="migration-guide"> 13 <h3>Migration Steps</h3> 14 <ol> 15 <li>Review removed properties (marked in red)</li> 16 <li>Update changed property values</li> 17 <li>Add new required properties (marked in green)</li> 18 </ol> 19 </div> 20 </div> 21 ); 22}
22 lines555 characters

Common Use Cases

1. Version Control

Track theme changes across versions:

  • Compare current version with previous releases
  • Identify breaking changes before deployment
  • Generate changelog from differences

2. Theme Variants

Compare different theme variants:

  • Light vs Dark mode differences
  • Brand theme variations
  • Seasonal or promotional themes

3. Quality Assurance

Ensure theme consistency:

  • Verify expected changes were applied
  • Catch unintended modifications
  • Validate theme structure compliance

Best Practices

Compare Before Releasing

Always compare theme versions before releasing updates. This helps identify breaking changes and ensures you document all modifications.

Use Filters Effectively

Enable "show only differences" when reviewing large themes to focus on what changed. Disable it to see the full context of unchanged properties.

Document Breaking Changes

Pay special attention to removed properties (marked in red). These are breaking changes that require migration steps in your documentation.

Performance Note

Differences are calculated once on mount and memoized. Even large themes compare efficiently without performance impact.

Related Tools

Combine ThemeComparator with other devtools:

→ Theme Inspector - Validate both themes→ Theme Preview - Preview both themes→ CLI Tool - Compare themes from command line← Back to Devtools Overview