Use when setting up or customizing Tailwind CSS configuration, theme customization, plugins, and build setup. Covers tailwind.config.js setup and content paths.
View on GitHubJanuary 24, 2026
Select agents to install to:
npx add-skill https://github.com/TheBushidoCollective/han/blob/main/jutsu/jutsu-tailwind/skills/tailwind-configuration/SKILL.md -a claude-code --skill tailwind-configurationInstallation paths:
.claude/skills/tailwind-configuration/# Tailwind CSS - Configuration
Tailwind CSS is highly customizable through its configuration file, allowing you to define your design system, extend the default theme, and configure plugins.
## Key Concepts
### Configuration File Structure
The `tailwind.config.js` (or `.ts`, `.cjs`, `.mjs`) file is the heart of Tailwind customization:
```javascript
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./src/**/*.{html,js,jsx,ts,tsx}',
'./pages/**/*.{js,ts,jsx,tsx}',
'./components/**/*.{js,ts,jsx,tsx}',
],
theme: {
extend: {
// Custom theme extensions
},
},
plugins: [],
darkMode: 'class', // or 'media'
prefix: '',
important: false,
separator: ':',
}
```
### Content Configuration
The `content` array tells Tailwind where to look for class names:
```javascript
module.exports = {
content: [
'./src/**/*.{html,js,jsx,ts,tsx}',
'./pages/**/*.{js,ts,jsx,tsx}',
'./components/**/*.{js,ts,jsx,tsx}',
'./app/**/*.{js,ts,jsx,tsx}',
'./public/index.html',
],
// ...
}
```
#### Content with Transform
For dynamic class names, use safelist or content transform:
```javascript
module.exports = {
content: {
files: ['./src/**/*.{html,js}'],
transform: {
md: (content) => {
// Extract classes from markdown
return content
}
}
},
safelist: [
'bg-red-500',
'bg-green-500',
{
pattern: /bg-(red|green|blue)-(100|200|300)/,
},
],
}
```
## Theme Customization
### Extending the Default Theme
Use `theme.extend` to add to existing values without replacing them:
```javascript
module.exports = {
theme: {
extend: {
colors: {
brand: {
50: '#f0f9ff',
100: '#e0f2fe',
200: '#bae6fd',
300: '#7dd3fc',
400: '#38bdf8',
500: '#0ea5e9',
600: '#0284c7',
700: '#0369a1',
800: '#075985',
900: '#0c4a6e',
950: '#082f49',