Installation

NPM Package (Recommended)

Install Twigwind via NPM for the latest version and easy updates:

npm install twigwind

GitHub Repository

Clone the repository for development or manual installation:

git clone https://github.com/helloadhavan/twigwind.git

Project Structure

After installation, you'll have access to these key files:

CDN Usage

Include Twigwind in your HTML for runtime CSS generation:

<!-- Base styles (optional) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/twigwind@latest/src/css.min.css">

<!-- Twigwind JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/twigwind@latest/src/css.js"></script>

Initialize Twigwind after DOM content loads:

document.addEventListener("DOMContentLoaded", () => {
  document.querySelectorAll("[class]").forEach(el => Twigwind.twApply(el));
  Twigwind.twInject();
});

Build System (Optional)

For optimized production builds, use the build system:

# Run build system with file watching
twigwind build --watch

The build system will:

💡 Tip: Use runtime generation for development and build-time optimization for production.