スキル一覧に戻る
Syedaashnaghazanfar

tailwind-css

by Syedaashnaghazanfar

2🍴 0📅 2026年1月6日
GitHubで見るManusで実行

SKILL.md


name: tailwind-css description: Comprehensive Tailwind CSS utility framework patterns including responsive design, dark mode, custom themes, and layout systems. Use when styling React/Next.js applications with utility-first CSS.

Tailwind CSS Skill

Utility-first CSS framework for rapid, consistent UI development.

Quick Start

Installation

# npm
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

# pnpm
pnpm add -D tailwindcss postcss autoprefixer
pnpm dlx tailwindcss init -p

Configuration

// tailwind.config.js
/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    "./app/**/*.{js,ts,jsx,tsx,mdx}",
    "./pages/**/*.{js,ts,jsx,tsx,mdx}",
    "./components/**/*.{js,ts,jsx,tsx,mdx}",
    "./src/**/*.{js,ts,jsx,tsx,mdx}",
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

CSS Setup

/* globals.css */
@tailwind base;
@tailwind components;
@tailwind utilities;

Core Concepts

ConceptGuide
Utility Classesreference/utilities.md
Responsive Designreference/responsive.md
Dark Modereference/dark-mode.md
Customizationreference/customization.md

Examples

PatternGuide
Layout Patternsexamples/layouts.md
Spacing Systemsexamples/spacing.md
Typographyexamples/typography.md

Templates

TemplatePurpose
templates/tailwind.config.tsExtended configuration

Quick Reference

Spacing Scale

ClassValuePixels
000px
0.50.125rem2px
10.25rem4px
20.5rem8px
30.75rem12px
41rem16px
51.25rem20px
61.5rem24px
82rem32px
102.5rem40px
123rem48px
164rem64px
205rem80px
246rem96px

Breakpoints

PrefixMin-widthCSS
sm640px@media (min-width: 640px)
md768px@media (min-width: 768px)
lg1024px@media (min-width: 1024px)
xl1280px@media (min-width: 1280px)
2xl1536px@media (min-width: 1536px)

Common Utilities

// Layout
<div className="flex items-center justify-between" />
<div className="grid grid-cols-3 gap-4" />
<div className="container mx-auto px-4" />

// Spacing
<div className="p-4 m-2 space-y-4" />
<div className="px-6 py-3 mt-4 mb-8" />

// Typography
<h1 className="text-4xl font-bold tracking-tight" />
<p className="text-sm text-muted-foreground leading-relaxed" />

// Colors
<div className="bg-primary text-primary-foreground" />
<div className="bg-slate-100 dark:bg-slate-900" />

// Borders & Effects
<div className="rounded-lg border shadow-sm" />
<div className="ring-2 ring-primary ring-offset-2" />

// Sizing
<div className="w-full h-screen max-w-md min-h-[200px]" />

// Position
<div className="relative absolute top-0 left-0 z-10" />
<div className="fixed bottom-4 right-4 sticky top-0" />

State Variants

// Hover, Focus, Active
<button className="hover:bg-primary/90 focus:ring-2 active:scale-95" />

// Disabled
<button className="disabled:opacity-50 disabled:cursor-not-allowed" />

// Group hover
<div className="group">
  <span className="group-hover:text-primary" />
</div>

// Focus within
<div className="focus-within:ring-2" />

// First/Last child
<li className="first:pt-0 last:pb-0" />

Responsive Patterns

// Mobile-first responsive
<div className="text-sm md:text-base lg:text-lg" />
<div className="flex-col md:flex-row" />
<div className="grid-cols-1 sm:grid-cols-2 lg:grid-cols-4" />
<div className="hidden md:block" />
<div className="md:hidden" />

Dark Mode

// Dark mode variants
<div className="bg-white dark:bg-slate-950" />
<p className="text-slate-900 dark:text-slate-100" />
<div className="border-slate-200 dark:border-slate-800" />

Best Practices

  1. Mobile-first: Start with mobile styles, add breakpoint prefixes for larger screens
  2. Consistent spacing: Use the spacing scale (4, 8, 12, 16, 24, 32, 48, 64)
  3. Semantic colors: Use design tokens (primary, muted, destructive) over raw colors
  4. Component extraction: Use @apply sparingly, prefer component abstraction
  5. Arbitrary values: Use [value] syntax for one-off values: w-[237px]

Integration with shadcn/ui

Tailwind CSS is the styling foundation for shadcn/ui. The shadcn skill covers:

  • CSS variables for theming
  • Component-specific utility patterns
  • Design token integration

See shadcn skill for component-specific patterns.

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です