1. Installation
  2. Install Tailwind CSS with Rsbuild

Installation

Install Tailwind CSS with Rsbuild

Setting up Tailwind CSS in a Rsbuild project.

01

Create your project

Start by creating a new Rsbuild project if you don’t have one set up already. The most common approach is to use Rsbuild CLI.

Terminal
npm create rsbuild@latest
02

Install Tailwind CSS

Install @tailwindcss/postcss and its peer dependencies.

Terminal
npm add tailwindcss @tailwindcss/postcss -D
03

Enable PostCSS support

In your rsbuild.config.js file, enable the PostCSS loader. See the documentation for more information.

rsbuild.config.ts
import { defineConfig } from '@rsbuild/core'
import tailwindCssPostcss from '@tailwindcss/postcss'
export default defineConfig({
tools: {
postcss: {
postcssOptions: {
plugins: [tailwindCssPostcss()],
},
},
}
})
04

Import Tailwind CSS

Add an @import to ./src/style.css that imports Tailwind CSS.

style.css
@import "tailwindcss";
05

Start your build process

Run your build process with npm run dev.

Terminal
npm run dev
06

Start using Tailwind in your project

Start using Tailwind’s utility classes to style your content.

App.vue
<template>
<h1 class="text-3xl font-bold underline">
Hello world!
</h1>
</template>
Copyright © 2025 Tailwind Labs Inc.·Trademark Policy