Integrations
Set up Master CSS in TanStack Start
Guide to setting up Master CSS in your TanStack Start project.
TanStack Start supports Vite and Rsbuild. This guide uses the Vite setup path.
Create a project
If you don't have a TanStack Start project, create one first.
npx @tanstack/cli@latest createcd my-appAdd Master CSS
Run the installer in static mode from the TanStack Start project root. Static mode scans complete class strings and emits generated CSS at build time.
npm create @master/css@rc -- --framework tanstack-start --mode static --yesStart dev server
Run the command to start the TanStack Start dev server.
npm run devStart using Master CSS
Now style your first route using Master CSS syntax.
localhost:3000
Hello World
The installer registers @master/css.vite in static mode, creates src/styles/app.css, and imports it from src/routes/__root.tsx.
import { createFileRoute } from '@tanstack/react-router'export const Route = createFileRoute('/')({ component: Home})function Home() { return ( <h1 className="m:2xl italic font:5xl font:heavy text:neutral"> Hello World </h1> )}