Setting Up TailwindCSS & Alpine.js in Hyvä (With Code Examples)
- November 22, 2025
No Comments
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:
<div class="bg-indigo-600 text-white p-4">
<h1 class="text-3xl font-bold">Welcome to My Hyvä Store</h1>
</div>
Tailwind classes apply instantly.
4. Adding Alpine.js
Example button toggle:
<div x-data="{ open: false }">
<button class="bg-blue-500 text-white px-4 py-2" @click="open = !open">
Toggle Message
</button>
<p x-show="open" class="mt-2 text-green-600">
Hello from Alpine.js!
</p>
</div>
Hyvä auto-loads Alpine.js — no extra setup needed.
About us and this blog
We are a digital magento 2 development agency with a focus on helping our customers achieve great results across several key areas.
More From Our Blogs
See all posts
Meet Magento Netherlands 2025 🇳🇱 is one of the most anticipated Magento events in Europe, bringing…
In the world of Magento development, speed and performance have become critical ranking factors. With Google’s…
Running a successful Magento 2 store requires more than a great theme and product catalog. Extensions…
In this third part of the series, we build a custom block + template using Hyvä’s…
Now that Hyvä Theme is Open Source, developers finally have access to a modern Magento frontend…
The Magento ecosystem has officially entered a new era. With the announcement that Hyvä is now…
No Comments
Recent Posts
- Meet Magento Netherlands 2025 🇳🇱 — The Ultimate Magento Event You Cannot Miss November 25, 2025
- Why Magento-Services.com Is the Leading Hyvä Development Agency in 2025 November 22, 2025
- 10 Essential Magento 2 Extensions to Supercharge Your Online Store in 2025 November 22, 2025
All Website Tags
custom module
Magento2
Magento 2 custom block
Magento 2 custom controller
Magento 2 custom layout
Magento 2 custom module
Magento 2 custom module development
Magento 2 custom template
Magento 2.4.6
Magento 2.4.6 developer in United Kingdom
Magento 2.4.6 development in United Kingdom
Magento 2.4.6 update services in United Kingdom
Magento 2.4.6 version upgrade services in United Kingdom
Magento security
PHP8.2
product slider
slick
slider
Upgrade to PHP8.2