Skip to content
Skills Library
Programming · Building & coding

tailwind-patterns

/tailwind-patterns

Tailwind CSS v4 patterns, component styling, dark mode, responsive design, and design system integration. Use when styling components or reviewing CSS.

Licence
MIT
Last repository change
06.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 06.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Tailwind CSS v4 patterns, component styling, dark mode, responsive design, and design system integration. Use when styling components or reviewing CSS.

Original author description

Tailwind CSS v4 patterns, component styling, dark mode, responsive design, and design system integration. Use when styling components or reviewing CSS.

How it works

  1. Core Approach
  2. Component Patterns
  3. Design Tokens (v4)
  4. Common Patterns
  5. Forbidden Patterns
Original SKILL.md headings · 110 lines, 306 words
SKILL.md preview
---
name: tailwind-patterns
description: Tailwind CSS v4 patterns, component styling, dark mode, responsive design, and design system integration. Use when styling components or reviewing CSS.
---

# Tailwind Patterns

## Core Approach

- Utility-first: compose classes, don't write custom CSS
- Extract components, not classes (use React components, not `@apply`)
- Consistent spacing/color via design tokens

## Component Patterns

### Button Variants

```tsx
const buttonVariants = {
  primary: 'bg-blue-600 hover:bg-blue-700 text-white',
  secondary: 'bg-gray-100 hover:bg-gray-200 text-gray-900',
  danger: 'bg-red-600 hover:bg-red-700 text-white',
  ghost: 'hover:bg-gray-100 text-gray-700',
}

interface ButtonProps {
  variant?: keyof typeof buttonVariants
  size?: 'sm' | 'md' | 'lg'
  children: React.ReactNode
}

export const Button = ({ variant = 'primary', size = 'md', children }: ButtonProps) => {
  const sizes = { sm: 'px-3 py-1.5 text-sm', md: 'px-4 py-2', lg: 'px-6 py-3 text-lg' }
  return (
    <button className={`${buttonVariants[variant]} ${sizes[size]} rounded-lg font-medium transition-colors`}>
      {children}
    </button>
  )
}
```

### Responsive Design

```tsx
// Mobile-first approach
<div className="
  flex flex-col          // mobile: stack
  md:flex-row            // tablet: row
  lg:grid lg:grid-cols-3 // desktop: 3 columns
  gap-4
">
```

### Dark Mode

```tsx
// Use dark: prefix
<div className="bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100">
  <p className="text-gray-600 dark:text-gray-400">
    Secondary text
  </p>
</div>
```

## Design Tokens (v4)

```css
/* In CSS — v4 uses CSS variables */
@theme {
  --color-primary: oklch(0.6 0.2 250);
  --color-primary-foreground: oklch(1 0 0);
  --spacing-page: 1.5rem;
  --radius-card: 0.75rem;
}
```

```tsx
// Use in components
<div className="bg-primary text-primary-foreground p-page rounded-card">
```

## Common Patterns

### Card

```tsx
<div className="rounded-xl border border-gray-200 bg-white p-6 shadow-sm dark:border-gray-800 dark:bg-gray-900">
```

### Form Input

```tsx
<input className="w-full rounded-lg border border-gray-300 bg-white px-4 py-2.5 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:border-gray-700 dark:bg-gray-900" />
```

### Skeleton Loader

```tsx
<div className="animate-pulse rounded-lg bg-gray-200 dark:bg-gray-700 h-4 w-3/4" />
```

## Forbidden Patterns

```tsx
// ❌ Never use @apply for component styles
.btn { @apply px-4 py-2; } // extract React component instead

// ❌ Arbitrary values when token exists
<div className="text-[#3b82f6]" /> // use text-blue-500

// ❌ Inline styles with Tailwind
<div style={{ color: 'blue' }} className="...">
```

Versions

RepositoryScoreLicence
This page · sabahattink/antigravity-fullstack-hq100MIT
Reprograme/redevkit100MIT
coco-research/coco100MIT
jeffersonvalente/cardume100MIT
hybridlabor-api/aos100Apache-2.0
tranhieutt/software_development_department100MIT

Database snapshot: 13.11.2026 · package version 4a072bb0113a (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100styling-with-tailwind
    Provides utility-first CSS styling patterns using Tailwind CSS 3.x. Use when styling components with utility classes, configuring tailwind.config.js, implementing responsive designs, or creating dark mode themes.
  • 100tailwind-best-practices
    Tailwind CSS patterns and conventions. Use when writing responsive designs, implementing dark mode, creating reusable component styles, configuring Tailwind, or migrating from v3 to v4. Triggers on tasks involving Tailwind classes, responsive design, dark mode, CSS styling, or…
  • 100tailwindcss
    Tailwind CSS v4 utility-first styling patterns including responsive design, dark mode, and custom configuration. Use when styling with Tailwind, adding utility classes, configuring Tailwind, setting up dark mode, or customizing the theme.
  • 100tailwind-css
    Tailwind CSS v4 patterns: CSS-first config, utility classes, component variants, v3 migration. Use when styling with Tailwind, configuring @theme tokens, using tailwind-variants/CVA, migrating v3 to v4, or fixing Tailwind styles and dark mode.
  • 100tailwind-css-patterns
    Provides comprehensive Tailwind CSS utility-first styling patterns including responsive design, layout utilities, flexbox, grid, spacing, typography, colors, and modern CSS best practices. Use when styling React/Vue/Svelte components, building responsive layouts, implementing…
  • 100tailwind-ops
    Tailwind CSS utility patterns, responsive design, component patterns, v4 migration, and configuration. Use for: tailwind, tailwindcss, utility classes, responsive design, dark mode, tailwind v4, tailwind config, tw, container queries, @apply, prose, typography, animation.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.