Skip to main content
We recommend using Next.js Storefront for new projects, as it offers better performance and a more modern developer experience.
Themes are the main building blocks of the storefront. They hold styles, settings, and templates for the storefront.

Default Theme

Spree comes with a default theme called default. It is used as a base for all the themes and contains the core styles and scripts. This theme is included with the Spree Commerce core and is always available.

Creating a New Theme

You can create your custom themes by following the steps below.
This command will create a new theme called my_theme in the app/views/themes directory and copy the default theme files to the new theme. It will also add a line in your config/initializers/spree.rb file to load the new theme.
config/initializers/spree.rb
Now you can go to Admin Dashboard -> Storefront -> Themes, you should see a new section Add new theme with your theme name. Click Add button to activate the theme.

Theme Templates

Theme has the following template structure:
Each directory contains standard Ruby on Rails ERB templates for the corresponding page. The page_sections directory contains sections that are used globally across the storefront. The shared directory contains shared components that are used across the storefront.

Theme Settings

The theme settings are stored in the app/models/spree/themes/my_theme.rb file.
These are standard Spree preferences that are configurable via Page Builder.