# Tailwind CSS
URL: /react/getting-started/styling/tailwind-css
Source: https://github.com/daangn/seed-design/blob/dev/docs/content/react/getting-started/styling/tailwind-css.mdx
Learn how to use Crispy in Tailwind CSS projects.
You can easily use tokens provided by Crispy through Tailwind CSS 3 and 4 utility classes, and override Crispy React component styles.
## Configuration
### Install dependencies
- npm: npm install @seed-design/css @seed-design/tailwind4-theme
- pnpm: pnpm add @seed-design/css @seed-design/tailwind4-theme
- yarn: yarn add @seed-design/css @seed-design/tailwind4-theme
- bun: bun add @seed-design/css @seed-design/tailwind4-theme
### Configure CSS file
```css title="style.css"
@layer theme, base, seed-base, components, seed-components, utilities;
@import "@seed-design/css/base.layered.css";
@import "tailwindcss";
@import "@seed-design/tailwind4-theme";
```
The `@layer` directive determines style priority between Crispy CSS and Tailwind. For details, see the [Cascade
Layers](/react/getting-started/styling/cascade-layers) documentation.
### Bundler configuration
Add the `seed-layered` condition to your bundler's module resolution configuration so Crispy React components use layered CSS files.
Refer to the [Cascade Layers](/react/getting-started/styling/cascade-layers#bundler-configuration) documentation for bundler-specific setup.
### Theming configuration
Tailwind CSS stylesheets work separately from the theming script. Follow the guides below to set up theming:
- [Vite](/react/getting-started/installation/vite)
- [Rsbuild](/react/getting-started/installation/rsbuild)
- [Webpack](/react/getting-started/installation/webpack)
- [Manual](/react/getting-started/installation/manual)
### Install dependencies
- npm: npm install @seed-design/css @seed-design/tailwind3-plugin
- pnpm: pnpm add @seed-design/css @seed-design/tailwind3-plugin
- yarn: yarn add @seed-design/css @seed-design/tailwind3-plugin
- bun: bun add @seed-design/css @seed-design/tailwind3-plugin
### base.css import
```ts title="index.tsx"
import "@seed-design/css/base.css";
```
### Tailwind Configuration File
```js title="tailwind.config.js"
import seedPlugin from "@seed-design/tailwind3-plugin"; // [!code highlight]
/** @type {import('tailwindcss').Config} */
export default {
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
theme: {
extend: {},
},
plugins: [seedPlugin], // [!code highlight]
};
```
### Theming configuration
Tailwind CSS stylesheets work separately from the theming script. Follow the guides below to set up theming:
- [Vite](/react/getting-started/installation/vite)
- [Rsbuild](/react/getting-started/installation/rsbuild)
- [Webpack](/react/getting-started/installation/webpack)
- [Manual](/react/getting-started/installation/manual)
## Utility Classes
You can use all Crispy design tokens as Tailwind utility classes.
### Colors
```tsx
import { VStack, Text } from "@seed-design/react";
export default function TailwindColors() {
return (
{/* 텍스트 색상 */}
text-fg-brand
text-fg-neutral
text-palette-blue-500
{/* 배경 색상 */}
bg-bg-informative-weak
bg-palette-gray-200
{/* 테두리 색상 */}
border-stroke-brand-solid
border-palette-red-500
);
}
```
### Typography
```tsx
import { VStack } from "@seed-design/react";
export default function TailwindTypography() {
return (
screen-title
t3-regular
t3-bold
t4-medium
article-body
);
}
```
### Sizes and Spacing
```tsx
import { VStack, HStack, Text } from "@seed-design/react";
export default function TailwindSpacing() {
return (
{/* 크기 유틸리티 */}
size-x6w-x8 h-x4
{/* 패딩 유틸리티 */}
p-x2
px-x4 py-x2
{/* 간격 유틸리티 */}
p-x2 gap-x3
);
}
```
### Border Radius
```tsx
import { HStack, VStack, Text } from "@seed-design/react";
export default function TailwindBorderRadius() {
return (
rounded-r2rounded-r4rounded-full
);
}
```
### Gradient
```tsx
import { VStack, Text } from "@seed-design/react";
export default function TailwindGradient() {
return (
bg-gradient-glow-magic-[90deg]bg-gradient-highlight-magic-[90deg]
);
}
```
## Related Documentation
Even without Tailwind CSS, you can easily use Crispy tokens.
Learn how to use Crispy tokens in layout components.