본문으로 건너뛰기
cccskills
무료GitHub에 공개

tailwind-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 design systems, or optimizing CSS workflow.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ever-works/ever-works스타 182(GitHub 182 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(9)

  • SKILL.md6.2 KB
  • references/accessibility.md3.9 KB
  • references/animations.md3.3 KB
  • references/component-patterns.md4.4 KB
  • references/configuration.md3.0 KB
  • references/layout-patterns.md3.7 KB
  • references/performance.md2.4 KB
  • references/reference.md9.7 KB
  • references/responsive-design.md3.6 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Tailwind CSS Development Patterns

Expert guide for building modern, responsive user interfaces with Tailwind CSS utility-first framework. Covers v4.1+ features including CSS-first configuration, custom utilities, and enhanced developer experience.

Overview

Provides actionable patterns for responsive, accessible UIs with Tailwind CSS v4.1+. Covers utility composition, dark mode, component patterns, and performance optimization.

When to Use

  • Styling React/Vue/Svelte components
  • Building responsive layouts and grids
  • Implementing design systems
  • Adding dark mode support
  • Optimizing CSS workflow

Quick Reference

Responsive Breakpoints

PrefixMin WidthDescription
sm:640pxSmall screens
md:768pxTablets
lg:1024pxDesktops
xl:1280pxLarge screens
2xl:1536pxExtra large

Common Patterns

<!-- Center content -->
<div class="flex items-center justify-center min-h-screen">Content</div>

<!-- Responsive grid -->
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
	<!-- Items -->
</div>

<!-- Card component -->
<div class="bg-white rounded-lg shadow-lg p-6">
	<h3 class="text-xl font-bold">Title</h3>
	<p class="text-gray-600">Description</p>
</div>

Instructions

  1. Start Mobile-First: Write base styles for mobile, add responsive prefixes (sm:, md:, lg:) for larger screens
  2. Use Design Tokens: Leverage Tailwind's spacing, color, and typography scales
  3. Compose Utilities: Combine multiple utilities for complex styles
  4. Extract Components: Create reusable component classes for repeated patterns
  5. Configure Theme: Customize design tokens in tailwind.config.js or using @theme
  6. Verify Changes: Test at each breakpoint using DevTools responsive mode. Check for visual regressions and accessibility issues before committing.

Examples

Responsive Card Component

function ProductCard({ product }: { product: Product }) {
	return (
		<div className="bg-white rounded-lg shadow-lg overflow-hidden sm:flex">
			<img className="h-48 w-full object-cover sm:h-auto sm:w-48" src={product.image} />
			<div className="p-6">
				<h3 className="text-lg font-semibold">{product.name}</h3>
				<button className="mt-4 px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700">
					Add to Cart
				</button>
			</div>
		</div>
	);
}

Dark Mode Toggle

<div class="bg-white dark:bg-gray-900 text-gray-900 dark:text-white">
	<h1 class="dark:text-white">Title</h1>
</div>

Form Input

<input
	class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
	placeholder="you@example.com"
/>

Best Practices

  1. Consistent Spacing: Use Tailwind's spacing scale (4, 8, 12, 16, etc.)
  2. Color Palette: Stick to Tailwind's color system for consistency
  3. Component Extraction: Extract repeated patterns into reusable components
  4. Utility Composition: Prefer utility classes over @apply for maintainability
  5. Semantic HTML: Use proper HTML elements with Tailwind classes
  6. Performance: Ensure content paths include all template files for optimal purging
  7. Accessibility: Include focus styles, ARIA labels, and respect user preferences (reduced-motion)

Troubleshooting

Classes Not Applying

  • Check content paths: Ensure all template files are included in content: [] in config
  • Verify build: Run npm run build to regenerate purged CSS
  • Dev mode: Use npx tailwindcss -o with --watch flag for live updates

Responsive Styles Not Working

  • Order matters: Responsive prefixes must come before non-responsive (e.g., md:flex not flex md:flex)
  • Check breakpoint values: Verify breakpoints match your design requirements
  • DevTools: Use browser DevTools responsive mode to test at each breakpoint

Dark Mode Issues

  • Verify config: Ensure darkMode: 'class' or 'media' is set correctly
  • Toggle implementation: Use document.documentElement.classList.toggle('dark') for class strategy
  • Initial flash: Add dark class to <html> before body renders

Constraints and Warnings

  • Class Proliferation: Long class strings reduce readability; extract into components
  • Content Paths: Misconfigured paths cause classes to be purged in production
  • Arbitrary Values: Use sparingly; prefer design tokens for consistency
  • Specificity Issues: Avoid @apply with complex selectors
  • Dark Mode: Requires correct configuration (class or media strategy)
  • Browser Support: Check Tailwind docs for compatibility notes

References

External Resources

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Audit and improve web accessibility following WCAG 2.2 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ever-works/ever-works1822026년 10월 24일 업데이트

ai-sdk

무료

Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ever-works/ever-works1822026년 10월 24일 업데이트

Configure Better Auth server and client, set up database adapters, manage sessions, add plugins, and handle environment variables. Use when users mention Better Auth, betterauth, auth.ts, or need to set up TypeScript authentication with email/password, OAuth, or plugin configuration.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ever-works/ever-works1822026년 10월 24일 업데이트

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ever-works/ever-works1822026년 10월 24일 업데이트

Configure email verification, implement password reset flows, set password policies, and customise hashing algorithms for Better Auth email/password authentication. Use when users need to set up login, sign-in, sign-up, credential authentication, or password security with Better Auth.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ever-works/ever-works1822026년 10월 24일 업데이트

Repo-specific guide to the Ever Works monorepo (ever-works/ever-works) — its pnpm + Turborepo layout, the per-workspace test runners (Jest vs Vitest vs Playwright), file-naming and import-alias conventions, the commit/branch model, and the real build/lint/type-check commands. Use this whenever working anywhere in this repository so changes match the codebase's actual conventions and pass CI.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ever-works/ever-works1822026년 10월 24일 업데이트

ever-works의 스킬 모두 보기

이 스킬의 문제 신고