Tailwind CSS

Configure PostCSS to compile only the style areas your project uses.

Install the build dependencies

This setup uses Tailwind CSS 4.3.3 or later in the 4.x series and PostCSS 8.5 or later in the 8.x series.

npm install -D "tailwindcss@^4.3.3" "@tailwindcss/postcss@^4.3.3" "postcss@^8.5.0"

Configure PostCSS

In the project root, register the NewUI plugin before the Tailwind plugin.

postcss.config.mjs
import newui from "@egcs/newui/postcss";
import tailwind from "@tailwindcss/postcss";

export default { plugins: [newui(), tailwind()] };

Select style areas

Add these imports to your entry stylesheet and import that file once in your application. Use it in place of @egcs/newui/styles.css.

@import "tailwindcss";
@import "@egcs/newui/tailwind/preset.css";
@import "@egcs/newui/tailwind/actions.css";

The optional preset connects utilities such as bg-surface to NewUI tokens. The actions.css import includes styles for Button.