
Product
A Fresh Look for the Socket Dashboard
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
react-liquid-theme
Advanced tools
A tool for generating shopify .liquid theme files from React components.
A tool for building Shopify themes using React components.
npm install react-liquid-theme
⚠️ Note: This package only supports ESM (ECMAScript Modules). It will not work with CommonJS.
Include this in a definition file (e.g., src/declarations.d.ts
).
/// <reference types="react-liquid-theme/declarations" />
Then Run this command to generate the Shopify theme files:
# Generate liquid files from React components
npx react-liquid-theme generate
mkdir my-theme
cd my-theme
npm install react-liquid-theme
npx react-liquid-theme setup
react-liquid-theme generate
OptionsOption | Alias | Type | Default | Description |
---|---|---|---|---|
--source | -s | string | src | Source directory for React components |
--dist | -d | string | .react-liquid | Intermediate JS output dir (add to .gitignore) |
--theme | -t | string | theme | Shopify theme output directory |
--watch | -w | boolean | false | Watch mode for development |
--env | string | .env | Environment file | |
--css | string | main.css | Output CSS file name | |
--js | string | main.js | Output JS file name |
Use file suffixes to automatically route to Shopify theme folders,
the .client.extension.ts
files will be compiled to a single main.js
file in the assets
directory.
File Pattern | Output Directory |
---|---|
*.snippet.tsx | theme/snippets |
*.section.tsx | theme/sections |
*.template.tsx | theme/templates |
*.{section,template,snippet}.client.ts | assets/main.js |
React Liquid Theme supports:
Import styles into React components, and they will be bundled into main.css
in the theme/assets
directory.
These React components map to Liquid tags or control flow logic:
Component | Description |
---|---|
LiquidAssign | {% assign %} |
LiquidBreak | {% break %} |
LiquidCapture | {% capture %} |
LiquidContinue | {% continue %} |
LiquidFor | {% for %} |
LiquidIf | {% if %} |
LiquidUnless | {% unless %} |
LiquidStatement | {% liquid %} |
LiquidExpression | {{ expression }} |
LiquidTag | Can create any tag |
MIT
FAQs
A tool for generating shopify .liquid theme files from React components.
The npm package react-liquid-theme receives a total of 326 weekly downloads. As such, react-liquid-theme popularity was classified as not popular.
We found that react-liquid-theme demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
Industry Insights
Terry O’Daniel, Head of Security at Amplitude, shares insights on building high-impact security teams, aligning with engineering, and why AI gives defenders a fighting chance.
Security News
MCP spec updated with structured tool output, stronger OAuth 2.1 security, resource indicators, and protocol cleanups for safer, more reliable AI workflows.