- Install the dependencies
npm install @react-zero-ui/corenpm install @tailwindcss/postcss- Add the plugin to your vite.config.ts
// vite.config.*
import zeroUI from '@react-zero-ui/core/vite';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import tailwindCss from '@tailwindcss/postcss';
export default defineConfig({
// ❗️Remove the default `tailwindcss()` plugin - and pass it into the `zeroUI` plugin
plugins: [zeroUI({ tailwind: tailwindCss }), react()],
});- Import Tailwind CSS
// global.css
@import "tailwindcss";Thats it.
The plugin will add the data-* attributes to the body tag (no FOUC) and the CSS will be injected and transformed by tailwind.