⚡ Hyvä Theme · 2 min read

Setting Up TailwindCSS & Alpine.js in Hyvä (With Code Examples)

Hyvä uses TailwindCSS for styling and Alpine.js for interactivity — a much cleaner alternative to KnockoutJS. This article shows how to: ✔ Compile Tailwind ✔ Add Tailwind classes ✔...

Hyvä uses TailwindCSS for styling and Alpine.js for interactivity — a much cleaner alternative to KnockoutJS.

This article shows how to:

✔ Compile Tailwind
✔ Add Tailwind classes
✔ Add Alpine.js interactive components


1. Install Node Dependencies

Go to Hyvä theme folder:

cd app/design/frontend/Hyva/default

Install dependencies:

npm install

2. Build TailwindCSS

Run:

npm run build

OR watch changes live:

npm run watch

3. Example: Adding TailwindCSS Classes

Open:

app/design/frontend/Hyva/default/templates/html/header.phtml

Modify header:

Welcome to My Hyvä Store

Tailwind classes apply instantly.


4. Adding Alpine.js

Example button toggle:

Hello from Alpine.js!

Hyvä auto-loads Alpine.js — no extra setup needed.

Tagged: Hyvä Theme Magento 2
Share: Twitter LinkedIn
Hyvä Theme
Hyvä Theme Is Now Open Source – A New Era of Speed & Performance for M...
3 min read →
Hyvä Theme
How to Use the Free Hyvä Theme: Step-by-Step Guide for Magento Store O...
3 min read →
Hyvä Theme
Hyvä Goes Open Source: Why This Is a Turning Point for Magento Fronten...
4 min read →

Need Expert Magento Help?

Our certified Magento 2 & Hyvä team is ready for your project.

Get Free Quote 📞 Call Us