What are Themes?
Themes in EverShop allow you to customize the look and feel of your storefront without modifying the core codebase. A theme is a self-contained package that includes:- Custom React components
- Page layouts and templates
- Styling and design elements
- TypeScript/JavaScript configurations
How Themes Work
EverShop uses a component override system where themes can:- Add new components to existing pages
- Override core components with custom implementations
- Customize styles using Tailwind CSS
- Organize components by page or make them global
Theme Priority
When EverShop loads a page, it follows this component resolution order:- Theme components (highest priority)
- Module components (default EverShop components)
- Core components (base components)
Default Theme Structure
EverShop does not ship with a built-in theme. Instead, you create themes in thethemes/ directory of your project:
Theme Configuration
Themes are activated through theconfig/default.json file:
system.theme property specifies which theme directory to use.
Switching Themes
EverShop provides a CLI command to easily switch between themes:- Display all available themes in your
themes/directory - Let you select which theme to activate
- Update the
config/default.jsonfile automatically - Optionally run the build process to apply changes
Manual Theme Switching
You can also manually switch themes by editingconfig/default.json:
Development vs Production Mode
Themes behave differently depending on the environment:Development Mode
- EverShop loads components from the
themes/[theme-name]/src/directory - Changes are reflected in real-time during development
- TypeScript files are compiled on-the-fly
Production Mode
- EverShop loads pre-compiled components from
themes/[theme-name]/dist/ - You must run
npm run buildto compile theme changes - Better performance with optimized bundles
Theme Isolation
Each theme is isolated with its own:package.jsonfor dependenciestsconfig.jsonfor TypeScript configuration- Component directory structure
- Build output directory
Next Steps
Create a Theme
Learn how to create your first custom theme
Theme Structure
Understand the theme directory structure and required files
Customization
Customize styling and override components