# Sharing Tailwind CSS Styles Across Apps in a PNPM Workspaces Nx Monorepo

DevFeed: [Sharing Tailwind CSS Styles Across Apps in a PNPM Workspaces Nx Monorepo](<https://devfeed.tech/articles/sharing-tailwind-css-styles-across-apps-in-a-pnpm-workspaces-nx-monorepo-21452.md>)

Original publisher: [Read original article](<https://nx.dev/blog/sharing-tailwind-styles-nx-monorepo>)

Author: Juri Strumpflohner

Published: 2026-04-10T00:00:00Z

Content type: tutorial

Language: en

Sources: [Juri Strumpflohner](<https://devfeed.tech/sources/juri-strumpflohner.md>)

Topics: [frontend monorepo](<https://devfeed.tech/topics/frontend-monorepo.md>), [Tailwind CSS](<https://devfeed.tech/topics/tailwind.md>), [Design system](<https://devfeed.tech/topics/design-system.md>), [monorepo](<https://devfeed.tech/topics/monorepo.md>), [pnpm](<https://devfeed.tech/topics/pnpm.md>), [npm-workspaces](<https://devfeed.tech/topics/npm-workspaces.md>)

Tags: [automated](<https://devfeed.tech/tags/automated.md>), [css](<https://devfeed.tech/tags/css.md>), [design-tokens](<https://devfeed.tech/tags/design-tokens.md>), [directives](<https://devfeed.tech/tags/directives.md>), [monorepo](<https://devfeed.tech/tags/monorepo.md>), [multiple](<https://devfeed.tech/tags/multiple.md>), [nx](<https://devfeed.tech/tags/nx.md>), [package](<https://devfeed.tech/tags/package.md>), [pnpm](<https://devfeed.tech/tags/pnpm.md>), [share](<https://devfeed.tech/tags/share.md>), [sharing](<https://devfeed.tech/tags/sharing.md>), [sync-generators](<https://devfeed.tech/tags/sync-generators.md>), [tailwind](<https://devfeed.tech/tags/tailwind.md>), [tokens](<https://devfeed.tech/tags/tokens.md>), [workspaces](<https://devfeed.tech/tags/workspaces.md>)

## AI overview

The excerpt describes sharing Tailwind v4 design tokens across apps in a pnpm or npm workspace by placing a plain CSS file in a shared styles package and exposing that file directly through the package entry. Each app adds the Tailwind plugin and package dependency, then imports Tailwind and the shared tokens in its CSS entry point; no build step is needed. For Nx monorepos, a sync generator can read the project dependency graph and maintain Tailwind @source directives so utility-class scanning covers dependent libraries. The excerpt says Nx can be added to an existing workspace while preserving its scripts and structure. It does not include the actual package contents, generator wiring, or commands.

## Source excerpt

Share Tailwind v4 design tokens across multiple apps in a pnpm + Nx monorepo using a shared styles package and automated @source directives.