zerofront / theme-frontend-zero
Zero for Magento Open Source: a storefront theme on HTMX, Tailwind CSS and daisyUI, without RequireJS, jQuery or Knockout.
Package info
github.com/zerofrontdev/theme-frontend-zero
Language:HTML
Type:magento2-theme
pkg:composer/zerofront/theme-frontend-zero
Requires
- php: ~8.2.0||~8.3.0||~8.4.0
- magento/framework: 103.0.*
- magento/theme-frontend-blank: 100.4.*
- zerofront/module-zero-checkout: ^1.3
- zerofront/module-zero-core: ^1.3
Requires (Dev)
None
Suggests
- zerofront/module-zero-banner: Home page slider and banners managed in the admin
Provides
None
Conflicts
None
Replaces
README
The storefront theme of Zero for Magento Open Source: server-rendered templates, HTMX for the parts that refresh, Tailwind CSS v4 and daisyUI for the styles. No RequireJS, jQuery or Knockout on the storefront, and a strict Content Security Policy (no inline scripts or styles).
Install
Requires Magento Open Source 2.4.7–2.4.9 and PHP 8.2–8.4 with the GD extension built with WebP (php -r 'var_dump(function_exists("imagewebp"));' says true; Magento's own PHP requirements cover the rest). Without WebP in GD, Zero skips its WebP image copies and serves the originals.
composer require zerofront/theme-frontend-zero bin/magento setup:upgrade bin/magento setup:di:compile # production mode bin/magento setup:static-content:deploy # production mode bin/magento cache:flush
Composer installs zerofront/module-zero-core, zerofront/module-zero-checkout with it.
Build
cd app/design/frontend/Zero/default npm ci npm run build # web/css/app.css and web/js/htmx.min.js npm run dev:css # Tailwind in watch mode while editing
Rerun npm run build:css after changing a template, a style, or the set of
enabled modules: the build reads the modules from app/etc/config.php.
Everything about the pipeline, the files, when to rebuild and how the
deploy does it: docs/build.md.
Docs
- build.md: the CSS and JavaScript build, step by step.
- extensions.md: how a module adds templates, styles and HTMX fragments; compat modules for third-party extensions.
- child-themes.md: a store's own look on top of Zero.
- components.md: the UI components and the JS rule.
- performance.md: what the PageSpeed score rests on, the budgets, what to keep to when adding a module, a theme or content, and how to check before a deploy.
- cms.md, blog.md, analytics.md, social-login.md: the modules with a storefront of their own.
Layout of the folder
Magento_*/ templates and layout overrides per core module
src/styles/ app.css (Tailwind entry), base.css, components.css, utilities.css
src/styles/generated/ modules.css, written by the build (not in git)
web/css/app.css the built stylesheet (not in git)
web/js/ zero.js, product/*.js, cancel-order.js, htmx.min.js (built)
scripts/ collect-module-styles.mjs, copy-htmx.mjs, minify-theme-css.mjs
docs/ the developer docs above
License
OSL-3.0 or AFL-3.0, your choice: see NOTICE.md.
Zero is made by Fixstacks in partnership with Vilmate, a software development company. Documentation: https://zerofront.dev/docs. Demo store: https://demo.zerofront.dev.