
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A CLI and SDK for generating images and videos from JSX templates using Tailwind CSS.
The Shadcn for design and marketing. A template-based CLI tool for generating images and videos using React + Tailwind CSS + Satori.
text-foreground bg-primary/50)npm install -g loopwind
Or use with npx:
npx loopwind --help
loopwind add image-template
loopwind add video-template
Templates are installed to: .loopwind/<template>/.
Benefits:
loopwind render my-video '{"title":"Hello World"}'
Videos are rendered to MP4 by default and saved to the current directory.
Example video template (.loopwind/my-video/template.tsx):
export const meta = {
name: 'my-video',
type: 'video',
size: { width: 1920, height: 1080 },
video: { fps: 30, duration: 3 },
props: { title: 'string' }
};
export default function Template({ tw, title }) {
return (
<div style={tw('flex items-center justify-center w-full h-full bg-black')}>
{/* Fade in from 0ms to 800ms */}
<h1 style={tw('text-8xl font-bold text-white ease-out enter-fade-in/0/800')}>
{title}
</h1>
</div>
);
}
loopwind render banner-hero \
--props '{"title":"Hello World","subtitle":"Welcome to loopwind"}'
By default, images are saved to the current directory.
You can specify a custom output path:
loopwind render banner-hero \
--props '{"title":"Hello World","subtitle":"Welcome to loopwind"}' \
--out custom/path/banner.png
Or use a props file:
# props.json
{
"title": "Hello World",
"subtitle": "Welcome to loopwind"
}
loopwind render banner-hero --props props.json --out banner.png
Output formats:
# PNG (default) - best for photos and complex gradients
loopwind render banner-hero --props props.json --format png -o banner.png
# SVG - scalable vector, smaller file size, perfect for template composition
loopwind render banner-hero --props props.json --format svg -o banner.svg
# WebP - modern format, smaller than PNG with similar quality
loopwind render banner-hero --props props.json --format webp -o banner.webp
# JPEG - smallest file size, good for photos
loopwind render banner-hero --props props.json --format jpg -o banner.jpg
SVG benefits with template composition:
loopwind list
loopwind validate
loopwind validate banner-hero
loopwind uses shadcn/ui's design system by default! All templates have access to semantic color tokens:
// Use shadcn colors in templates
<div style={tw('bg-card border rounded-xl p-16')}>
<h1 style={tw('text-foreground font-bold')}>Title</h1>
<p style={tw('text-muted-foreground')}>Subtitle</p>
</div>
Supported shadcn classes:
text-primary, bg-secondary, text-muted-foreground, bg-card, border, bg-destructivebg-primary/50, text-muted-foreground/75, border/30loopwind.jsonSee SHADCN_INTEGRATION.md for complete documentation.
Templates automatically use your project's design tokens defined in .loopwind/loopwind.json. This allows generated images to match your brand colors and design system.
loopwind init
This creates a .loopwind/loopwind.json file in your project:
{
"colors": {
"primary": "#667eea",
"secondary": "#764ba2",
"background": "#ffffff",
"foreground": "#000000",
"muted": "#f3f4f6",
"accent": "#3b82f6",
"destructive": "#ef4444",
"border": "#e5e7eb"
},
"fonts": {
"sans": ["Inter", "system-ui", "sans-serif"],
"mono": ["JetBrains Mono", "monospace"]
},
"tokens": {
"borderRadius": {
"sm": "0.25rem",
"md": "0.5rem",
"lg": "1rem",
"xl": "1.5rem"
}
},
"defaults": {
"width": 1200,
"height": 630
}
}
Templates receive the config via props:
export default function MyTemplate({ title, config }) {
const primaryColor = config?.colors?.primary || '#000';
return (
<div style={{ background: primaryColor }}>
{title}
</div>
);
}
This ensures your generated images use the same colors as your Tailwind/Shadcn setup!
Templates can use Tailwind utility classes for styling! The tw() function is automatically provided:
export default function MyTemplate({ title, tw }) {
return (
<div style={tw('flex items-center justify-center w-full h-full bg-primary text-white')}>
<h1 style={tw('text-6xl font-bold')}>
{title}
</h1>
</div>
);
}
Combine with custom styles:
<div
style={{
...tw('flex flex-col p-20 text-white'),
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
}}
>
<h1 style={tw('text-8xl font-bold')}>{title}</h1>
</div>
loopwind automatically detects and uses your tailwind.config.js!
If you have a Tailwind project:
// tailwind.config.js
export default {
theme: {
extend: {
colors: {
primary: '#667eea',
brand: {
500: '#0ea5e9',
900: '#0c4a6e',
},
},
spacing: {
'72': '18rem',
},
},
},
};
Your templates can use these values:
<div style={tw('bg-primary text-white p-72')}>
<div style={tw('bg-brand-500')}>Custom brand color!</div>
</div>
Config priority:
tailwind.config.js (if exists)loopwind.json (fallback)Supported classes:
flex, flex-col, items-center, justify-between, etc.p-4, px-8, m-6, gap-4, etc.text-6xl, font-bold, text-center, etc.bg-primary, text-brand-500, etc. (from your config!)opacity-90, rounded-xl, etc.bg-card, text-foreground, text-muted-foregroundbg-primary/50, text-muted-foreground/75Note: Tailwind v4 uses CSS variables instead of JS config. We're working on CSS parsing support. For now, use loopwind.json or tailwind.config.js (v3 format).
loopwind includes Inter (Regular 400, Bold 700) bundled with the CLI. Fonts work out of the box with no configuration required.
By default, templates use the bundled Inter font. No setup required - works offline!
Configure custom fonts in loopwind.json:
{
"fonts": {
"sans": {
"family": ["CustomFont", "sans-serif"],
"files": [
{ "path": "fonts/CustomFont-Regular.woff", "weight": 400 },
{ "path": "fonts/CustomFont-Bold.woff", "weight": 700 }
]
}
}
}
Then use font classes in templates:
export default function Template({ title, tw }) {
return (
<h1 style={tw('font-sans font-bold text-6xl')}>
{title}
</h1>
);
}
Font paths are relative to your loopwind.json location.
Available classes:
font-sans - Uses fonts.sans from loopwind.jsonfont-serif - Uses fonts.serif from loopwind.jsonfont-mono - Uses fonts.mono from loopwind.jsonSupported formats: WOFF, WOFF2, TTF, OTF
Templates have access to built-in helper functions:
tw(classes) - Convert Tailwind classes to inline stylesqr(text, options?) - Generate QR codes from text/URLsimage(propKey) - Embed images as data URIsvideo(propKey) - Embed video frames (for video templates)template(name, props) - Embed other templatesconfig - Access loopwind.json configurationGenerate QR codes from any text or URL using the qr() helper:
export default function Template({ title, url, qr, tw }) {
return (
<div style={tw('flex flex-col items-center p-16')}>
<h1 style={tw('text-5xl font-bold mb-8')}>{title}</h1>
{/* QR code auto-generated from url prop */}
<img src={qr(url)} width={200} height={200} alt="QR Code" />
<p style={tw('text-xl mt-4')}>{url}</p>
</div>
);
}
Usage:
loopwind render qr-card '{
"title": "Visit Our Website",
"url": "https://loopwind.dev"
}'
Customization:
// Custom size and error correction
<img src={qr(url, {
width: 300,
margin: 2,
errorCorrectionLevel: 'H', // L, M, Q, H (higher = more error correction)
color: {
dark: '#000000',
light: '#FFFFFF'
}
})} />
How it works:
qr() with any prop value (url, text, etc.)<img src={...} />Use cases:
Embed images (jpg, png, gif, webp, svg) as data URIs using the image() helper:
export default function Banner({ background, tw, image }) {
return (
<div style={tw('relative w-full h-full')}>
<img src={image('background')} style={tw('absolute inset-0 w-full h-full object-cover')} />
<h1 style={tw('relative text-6xl font-bold text-white')}>Hello World</h1>
</div>
);
}
Props format:
{
"background": "./path/to/image.jpg"
}
Usage:
loopwind render banner '{
"background": "./my-background.jpg"
}'
How it works:
image('propKey') to get the data URI for that propUse cases:
For video templates, embed video frames synchronized to the current animation frame using the video() helper:
export default function VideoOverlay({ background, title, tw, video, frame, progress }) {
const opacity = progress < 0.2 ? progress / 0.2 : 1;
return (
<div style={tw('relative w-full h-full')}>
{/* Background video - auto-syncs to current frame */}
<img
src={video('background')}
style={tw('absolute inset-0 w-full h-full object-cover')}
/>
{/* Animated overlay */}
<h1
style={{
...tw('relative text-8xl font-bold text-white'),
opacity
}}
>
{title}
</h1>
</div>
);
}
Props format:
{
"title": "My Video",
"background": "./my-video.mp4"
}
Usage:
loopwind render video-overlay props.json --out output.mp4
How it works:
Use cases:
Embed one template inside another using the template() helper. This is perfect for creating composite designs where smaller templates are reused as building blocks.
Just call template() - no declaration needed:
export default function Template({ title, bannerTitle, bannerSubtitle, template, tw }) {
return (
<div style={tw('w-full h-full flex flex-col bg-slate-900 p-12')}>
<div style={tw('bg-white rounded-3xl p-10 flex flex-col')}>
<h1 style={tw('text-5xl font-bold mb-8')}>{title}</h1>
{/* Embed any template - auto-loaded on first render */}
<div style={tw('rounded-xl overflow-hidden flex')}>
{template('image', { title: bannerTitle, subtitle: bannerSubtitle })}
</div>
</div>
</div>
);
}
Usage:
loopwind render composite-card '{
"title": "Product Launch",
"bannerTitle": "New Release",
"bannerSubtitle": "Coming Soon"
}'
How it works:
template('any-template-name')Pass props directly:
{template('image', { title: 'Custom Title', subtitle: 'Custom Subtitle' })}
{template('qr-card', { url: 'https://example.com', title: 'Scan Me' })}
Use cases:
Templates are TSX files with metadata. Each template can be either an image or a video template (not both).
export const meta = {
name: "banner-hero",
description: "Hero banner with shadcn design",
type: "image", // Optional, defaults to "image"
size: { width: 1600, height: 900 },
props: {
title: "string",
subtitle: "string?"
}
};
export default function Template({ title, subtitle, tw, qr, template }) {
return (
<div style={tw('w-full h-full flex flex-col justify-center p-20 bg-background')}>
<div style={tw('bg-card border rounded-xl p-16 flex flex-col')}>
<h1 style={tw('text-8xl font-bold text-foreground')}>{title}</h1>
{subtitle && (
<p style={tw('text-4xl text-muted-foreground/75')}>{subtitle}</p>
)}
</div>
</div>
);
}
export const meta = {
name: "animated-banner",
description: "Animated hero banner with shadcn design",
type: "video",
size: { width: 1600, height: 900 },
props: {
title: "string",
subtitle: "string?"
},
video: {
fps: 30,
duration: 3
}
};
export default function Template({ title, subtitle, tw }) {
return (
<div style={tw('w-full h-full flex flex-col justify-center items-center bg-background p-20')}>
<div style={tw('bg-card border rounded-xl p-16 flex flex-col')}>
{/* Bounce in from below: starts at 0ms, lasts 600ms */}
<h1 style={tw('text-9xl font-bold text-foreground ease-out enter-bounce-in-up/0/600')}>
{title}
</h1>
{subtitle && (
<p style={tw('text-5xl text-muted-foreground/75 mt-6 ease-out enter-fade-in-up/300/600')}>
{subtitle}
</p>
)}
</div>
</div>
);
}
Tailwind-style animation classes for video templates. No manual progress or frame calculations needed!
enter-{animation}/{startMs}/{durationMs}
exit-{animation}/{startMs}/{durationMs}
loop-{animation}/{durationMs}
Animate any transform or opacity property directly using Tailwind-like utilities:
// Translate - numeric (4px per unit)
<div style={tw('enter-translate-x-5/0/500')}>Slide in 20px</div>
<div style={tw('loop-translate-y-10/1000')}>Oscillate 40px</div>
// Translate - keywords, fractions, arbitrary values
<div style={tw('enter-translate-y-full/0/800')}>Slide full height (100%)</div>
<div style={tw('enter-translate-x-1/2/0/600')}>Slide halfway (50%)</div>
<div style={tw('enter-translate-y-[20px]/0/500')}>Exact 20px</div>
<div style={tw('enter-translate-x-[5rem]/0/800')}>5rem (80px)</div>
// Opacity (0-100)
<div style={tw('enter-opacity-100/0/500')}>Fade to 100%</div>
<div style={tw('loop-opacity-50/1000')}>Pulse to 50%</div>
// Scale (0-200)
<div style={tw('enter-scale-100/0/500')}>Scale to 1.0x</div>
<div style={tw('enter-scale-150/0/800')}>Scale to 1.5x</div>
// Rotate (degrees)
<div style={tw('enter-rotate-90/0/500')}>Rotate 90°</div>
<div style={tw('loop-rotate-360/2000')}>Spin continuously</div>
// Skew (degrees)
<div style={tw('enter-skew-x-12/0/500')}>Skew horizontally</div>
// Negative values (prefix with -)
<div style={tw('enter--translate-x-5/0/500')}>Slide left</div>
// Combine multiple utilities
<div style={tw('enter-translate-y-10/0/500 enter-rotate-45/0/500')}>
Slide and rotate together
</div>
Available utilities: translate-x-{n}, translate-y-{n}, opacity-{n}, scale-{n}, rotate-{n}, skew-x-{n}, skew-y-{n}
// Fade in: starts at 0ms, lasts 500ms
<h1 style={tw('enter-fade-in/0/500')}>Hello</h1>
// Bounce in from below with easing
<h1 style={tw('ease-out enter-bounce-in-up/0/600')}>Title</h1>
// Staggered animations
<h1 style={tw('ease-out enter-fade-in-up/0/400')}>First</h1>
<p style={tw('ease-out enter-fade-in-up/200/400')}>Second</p>
Available: fade-in, fade-in-up, fade-in-down, fade-in-left, fade-in-right, slide-up, slide-down, slide-left, slide-right, bounce-in, bounce-in-up, bounce-in-down, bounce-in-left, bounce-in-right, scale-in, zoom-in, rotate-in, flip-in-x, flip-in-y
// Fade out: starts at 2500ms, lasts 500ms
<h1 style={tw('exit-fade-out/2500/500')}>Goodbye</h1>
// Combined enter and exit
<h1 style={tw('enter-fade-in/0/500 exit-fade-out/2500/500')}>
Hello and Goodbye
</h1>
// Pulse opacity every 500ms
<div style={tw('loop-fade/500')}>Pulsing</div>
// Continuous rotation every 2000ms
<div style={tw('loop-spin/2000')}>Spinning</div>
Available: loop-fade, loop-bounce, loop-spin, loop-ping, loop-wiggle, loop-float, loop-pulse, loop-shake
Add before animation class:
<h1 style={tw('ease-out-cubic enter-bounce-in/0/500')}>Dramatic</h1>
Available: linear, ease-in, ease-out, ease-in-out, ease-in-cubic, ease-out-cubic, ease-in-out-cubic, ease-in-quart, ease-out-quart, ease-in-out-quart
Apply different easing functions to enter, exit, and loop animations:
// Different easing for enter and exit
<h1 style={tw('enter-ease-out-cubic enter-fade-in/0/500 exit-ease-in exit-fade-out/2500/500')}>
Smooth entrance, sharp exit
</h1>
// Loop with linear easing, enter with bounce
<div style={tw('enter-ease-out enter-bounce-in/0/400 loop-ease-linear loop-fade/1000')}>
Bouncy entrance, linear loop
</div>
Available: enter-ease-*, exit-ease-*, loop-ease-* (works with all easing functions)
Natural, physics-based bouncy animations:
// Default spring easing
<h1 style={tw('ease-spring enter-bounce-in/0/500')}>Bouncy spring!</h1>
// Custom spring: ease-spring/mass/stiffness/damping
<h1 style={tw('ease-spring/1/100/10 enter-scale-in/0/800')}>
Custom spring (mass=1, stiffness=100, damping=10)
</h1>
// Per-animation-type spring
<div style={tw('enter-ease-spring enter-fade-in/0/500 exit-ease-out exit-fade-out/2500/500')}>
Spring entrance, smooth exit
</div>
Common spring presets:
ease-spring/1/100/10 - Gentle bounce (default)ease-spring/1/170/8 - Extra bouncyease-spring/1/200/15 - Snappy (no bounce)For CSS-like syntax:
<h1 style={tw('enter-slide-up/[0.6s]/[1.5s]')}>Hello</h1>
<h1 style={tw('enter-fade-in/[300ms]/[800ms]')}>World</h1>
See the Animation Documentation for complete reference.
loopwind initInitialize a .loopwind/loopwind.json config file with default design tokens.
loopwind add <template>Install a template from the registry.
Options:
-r, --registry <url> - Custom registry URLloopwind listList all installed templates with metadata.
loopwind render <template>Render a template to an image.
Options:
-p, --props <file> - Props file (JSON)-o, --out <file> - Output file path--format <format> - Output format: png, svg, webp (default: png)--video - Render as video (coming soon)loopwind validate [template]Validate template metadata. If no template is specified, validates all installed templates.
loopwind automatically validates templates and props before rendering, providing helpful error messages.
# Missing required props
$ loopwind render banner-hero --props '{}'
✖ Template validation failed
✗ props: Missing required prop: "title"
→ Add "title" to your props: --props '{"title":"value"}'
# Wrong prop type
$ loopwind render banner-hero --props '{"title":123}'
✖ Template validation failed
✗ props: Prop "title" should be a string, got number
→ Change "title" to a string: "title": "value"
When rendering fails, loopwind provides clear suggestions:
$ loopwind render my-template --props props.json
✖ Failed to render template
Error: Satori requires explicit display: flex for containers with multiple children
Suggestions:
• Add "flex" or "flex-col" to your Tailwind classes: tw("flex items-center")
• Or add display: flex directly: style={{ display: "flex", ...tw("...") }}
• Every <div> with 2+ children MUST have display: flex or display: none
See VALIDATION.md for complete validation documentation and troubleshooting.
Templates are stored in your project's .loopwind/ directory. Each template has its own folder with a template.tsx file.
mkdir -p .loopwind/my-template
template.tsx with exported meta:export const meta = {
name: "my-template",
description: "My custom template",
type: "image",
size: { width: 1200, height: 630 },
props: { title: "string" }
};
export default function MyTemplate({ title, tw }) {
return (
<div style={tw('flex items-center justify-center w-full h-full bg-black text-white text-5xl')}>
{title}
</div>
);
}
loopwind validate my-template
loopwind render my-template --props '{"title":"Hello"}' --out test.png
Video templates use type: "video" and support frame and progress props for animations.
Video templates are similar to image templates but include frame and progress props for animations:
export const meta = {
name: "my-video",
type: "video",
size: { width: 1200, height: 630 },
props: { title: "string" },
video: {
fps: 30,
duration: 3
}
};
export default function Template({ title, frame, progress, tw, qr, template }) {
return (
<div
style={{
...tw('w-full h-full flex items-center justify-center'),
opacity: progress,
transform: `translateY(${20 - progress * 20}px)`
}}
>
<h1 style={tw('text-6xl font-bold')}>{title}</h1>
</div>
);
}
# Render to MP4 (default - WASM encoder, no dependencies)
loopwind render my-video '{"title":"Animated Title"}' -o output.mp4
# Render to GIF (great for emails, GitHub, Slack)
loopwind render my-video '{"title":"Animated Title"}' --format gif -o output.gif
# With custom quality settings
loopwind render my-video props.json --crf 18 # Higher quality (lower CRF = better quality)
# Fast encoding with FFmpeg (2x faster, requires FFmpeg installed)
loopwind render my-video props.json --ffmpeg
# Export frames only (for manual encoding)
loopwind render my-video props.json --frames-only -o frames/
Output formats:
How it works:
Encoding options:
--ffmpeg): 2x faster encoding, smaller files, requires FFmpeg installedProps available in video templates:
frame - Current frame number (0 to totalFrames-1)progress - Animation progress from 0 to 1tw, qr, template, configPerformance:
A full documentation website is available in the website/ folder, built with Astro.
Local development:
cd website
npm install
npm run dev
Deployment:
The site is ready to deploy on Netlify, Vercel, or Cloudflare Pages. A netlify.toml is included for easy Netlify deployment.
See website/README.md for more details.
Templates are fetched from a registry (similar to shadcn/ui). The default registry is:
https://loopwind.dev/r
You can host your own registry and use it with:
loopwind add my-template --registry https://my-registry.com
MIT
FAQs
A CLI and SDK for generating images and videos from JSX templates using Tailwind CSS.
The npm package loopwind receives a total of 36 weekly downloads. As such, loopwind popularity was classified as not popular.
We found that loopwind 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.