---
title: "Hydrogen & Tailwind: The Perfect Match for Building Beautiful Storefronts"
description: "Tailwind's utility classes ship as the default styling option in Shopify's React-based Hydrogen storefront framework, and the case for them rests on componentization: styles live in reusable React components rather than semantically named classes like BEM-style product-card__title, so layouts can be copied or extracted (e.g. ProductCard to BlogCard) without renaming or duplicating CSS."
url: "https://swe.quest/articles/hydrogen-tailwind-the-perfect-match-for-building-beautiful-storefronts-f351623f38eedf37"
canonical: "https://shopify.engineering/hydrogen-tailwind-building-beautiful-storefronts"
source: "Shopify Engineering"
published: "2022-02-11"
difficulty: "medium"
kind: "Opinion"
reading_minutes: 10
tags: ["css","frontend","react","ecommerce","design-systems"]
---

# Hydrogen & Tailwind: The Perfect Match for Building Beautiful Storefronts

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2022-02-11, 10 min read, Opinion. Original: [https://shopify.engineering/hydrogen-tailwind-building-beautiful-storefronts](https://shopify.engineering/hydrogen-tailwind-building-beautiful-storefronts)

## Summary

Tailwind's utility classes ship as the default styling option in Shopify's React-based Hydrogen storefront framework, and the case for them rests on componentization: styles live in reusable React components rather than semantically named classes like BEM-style product-card\_\_title, so layouts can be copied or extracted (e.g. ProductCard to BlogCard) without renaming or duplicating CSS. Further arguments include enforced spacing and color constraints for visual consistency, copy-paste composability from libraries like Tailwind UI, easier team collaboration, and not having to name things. The tradeoff is a real learning curve that still requires CSS fundamentals, eased by good docs and the VSCode extension.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [CSS](https://swe.quest/tags/css.md) (Web & mobile)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [React](https://swe.quest/tags/react.md) (Web & mobile)
- [E-commerce](https://swe.quest/tags/ecommerce.md) (Domains)
- [Design systems](https://swe.quest/tags/design-systems.md) (Web & mobile)

## Prerequisites

- CSS basics ([easy posts on CSS](https://swe.quest/tags/css.md?difficulty=easy))
- React components ([easy posts on React](https://swe.quest/tags/react.md?difficulty=easy))

## Keywords

Tailwind CSS, Hydrogen, Shopify, Tailwind UI, HeadlessUI, BEM

## Related posts

- [How We Built Hydrogen: A React Framework for Building Custom Storefronts](https://swe.quest/articles/how-we-built-hydrogen-a-react-framework-for-building-custom-storefronts-0de0baea8226959f.md): Shopify Engineering · 2022-06-22 · Medium · 13 min read · React, Frontend, Web performance, GraphQL, E-commerce
  Hydrogen, Shopify's React framework for custom storefronts, was built on React Server Components, React 18 streaming SSR and Vite, chosen over static JAMStack approaches because commerce pages are inherently dynamic.
- [Why We Ripped Twin out of 400+ Components](https://swe.quest/articles/why-we-ripped-twin-out-of-400-components-f0b99539dbfc3cb4.md): Railway · 2023-05-04 · Medium · 7 min read · CSS, Frontend, Refactoring & migrations, Build systems, React
  Railway replaced twin.macro with vanilla Tailwind across 400+ React components, which removed the last dependency on Babel and let the monorepo move fully to SWC.
- [Rapid Development with Hydrogen: Building a Product Page](https://swe.quest/articles/rapid-development-with-hydrogen-building-a-product-page-02ffb62bb6c7bb95.md): Shopify Engineering · 2022-02-02 · Medium · 5 min read · React, E-commerce, Frontend
  Hydrogen, Shopify's React-based storefront framework, can produce a working product display page quickly by composing its built-in commerce components and hooks.
- [How we use Web Components at GitHub](https://swe.quest/articles/how-we-use-web-components-at-github-43357e36de1ecc50.md): GitHub Engineering · 2021-05-04 · Medium · 8 min read · Frontend, Browsers, Design systems, TypeScript, Refactoring & migrations
  GitHub moved from jQuery to native Web Components starting in 2014 and now ships dozens of custom elements such as \<include-fragment\>, \<details-dialog\> and \<relative-time\>.
- [How Thumbtack structures their design system](https://swe.quest/articles/how-thumbtack-structures-their-design-system-88dae4da18cdc3ea.md): Figma · 2023-07-13 · Medium · 8 min read · Design systems, Frontend, React, CSS
  Thumbtack's Thumbprint design system is organized in three layers: design tokens shared by web and native, an atomic CSS library built on the tokens, and accessible React components on top.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
