Theme Configuration
Themes control the visual presentation and user interface of your EverShop store. Unlike extensions which handle business logic, themes focus purely on the frontend experience.Configuration Location
The active theme is configured in thesystem.theme property:
config/default.json- Base theme configurationconfig/development.json- Development theme overrideconfig/production.json- Production theme override
Theme Configuration Schema
The name of the active theme directory. This should match a directory name in the
themes/ folder.Example: "anasuplements", "default", "custom"Configuration Example
Here’s the actual theme configuration from your EverShop project:config/default.json
config/default.json
config/development.json
config/development.json
config/production.json
config/production.json
Active Theme: anasuplements
The current project uses theanasuplements theme, which is designed for a supplements e-commerce store.
Theme Structure
Theme Package Configuration
Theme Components
The anasuplements theme includes:Account Pages
Dashboard.tsx- Customer account dashboardLogin.tsx- Customer login pageRegister.tsx- Customer registration page
Global Components
Header.tsx- Site-wide header navigationFooter.tsx- Site-wide footer
Homepage Components
Hero.tsx- Hero section with main bannerFeaturedProducts.tsx- Featured product carousel/gridFeatures.tsx- Store features/benefits section
TypeScript Configuration
Theme Development
Creating Page Components
Theme components are React components with special exports for layout configuration:Component Areas
EverShop uses a flexible area system for component placement:| Area ID | Description |
|---|---|
header | Header section |
content | Main content area |
footer | Footer section |
sidebar | Sidebar (if applicable) |
Sort Order
ThesortOrder determines component rendering order within an area:
- Lower numbers render first
- Typical range: 10-100
- Step by 10s to allow insertion
Changing Themes
Switch to a Different Theme
To change your active theme:-
Update
config/default.json: -
Ensure the theme directory exists:
-
Rebuild the application:
Development vs Production Themes
You can use different themes per environment:Creating a Custom Theme
Step 1: Create Theme Directory
Step 2: Create package.json
Step 3: Create tsconfig.json
Step 4: Create Components
Create your first component:Step 5: Configure and Build
Styling and Assets
CSS/Tailwind Integration
EverShop themes typically use Tailwind CSS for styling:The anasuplements theme uses a green/mint color scheme:
- Primary:
#2D5A3D(Green) - Background:
#F8FAF9(Pearl White) - Borders:
#E8F5E9(Light Green)
Static Assets
Place static assets in thepublic/ directory at the project root:
Theme Organization
Page Component Structure
Organize components by their purpose:Component Naming Conventions
- Use PascalCase for component files:
FeaturedProducts.tsx - Match directory names to page areas:
frontStore,admin - Use descriptive names that indicate purpose:
Hero.tsx,ProductGrid.tsx
Best Practices
Theme Development
- Component Isolation: Keep components focused on presentation
- Reusability: Create shared components in the
all/directory - TypeScript: Use TypeScript for type safety
- Responsive Design: Design mobile-first with Tailwind utilities
Version Control
- Commit theme source code (
src/) - Exclude compiled output (
dist/) - Document theme features in a README
Testing
Common Issues
Theme not loading after configuration
Theme not loading after configuration
Verify:
- Theme name in config matches directory name exactly
package.jsonexists in theme directory- You’ve run
npm run buildafter configuration changes - No TypeScript compilation errors
Components not rendering
Components not rendering
Check:
- Component exports default function
layoutexport is properly configuredareaIdmatches available areas- No runtime errors in browser console
Styles not applying
Styles not applying
Ensure:
- Tailwind classes are correctly spelled
- Custom CSS is properly imported
- Build process completed successfully
- Browser cache is cleared
Related Configuration
- Shop Settings - Configure language and currency
- Extension Configuration - Configure enabled extensions
Next Steps
- Explore the anasuplements theme source code
- Customize theme components for your brand
- Learn about Tailwind CSS integration
- Create reusable component libraries