跳到主内容
智客 ZICQ

技能库 智客分类:设计创意 tailwind-css-patterns

Tailwind Css Patterns

提供全面的Tailwind CSS第一型型式,包括响应性设计、布局公用事业、弹性箱、网格、间隔、打字、颜色和现代CSS最佳做法。 使用时使用Stypling React/Vue/Svelte组件,构建应答布局,实施设计系统,或优化CSS工作流程.

18023 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

提供全面的 Tailwind CSS 公用事业第一型模式,包括响应性设计、布局公用事业、弹性箱、网格、间隔、打字、颜色和现代 CSS 最佳做法

何时用

- 造型反应/Vue/Svelte组件

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Tailwind CSS Development Patterns、Overview、When to Use、Quick Reference、Responsive Breakpoints、Common Patterns。 其中含规范建议的小节:输入输出示例。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/layout-patterns.md、references/component-patterns.md、references/responsive-design.md、references/animations.md、references/performance.md、references/accessibility.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

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.

Tailwind CSS Development PatternsOverviewWhen to UseQuick ReferenceResponsive BreakpointsCommon PatternsInstructionsExamplesResponsive Card ComponentDark Mode ToggleForm InputBest Practices

· allowed-tools:Read, Write, Edit, Glob, Grep, Bash

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
tailwind-css-patterns
description
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.
allowed-tools
Read, Write, Edit, Glob, Grep, Bash实验字段,支持情况取决于客户端;字段声明本身不会授予工具权限。
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 6
  • references/layout-patterns.md
  • references/component-patterns.md
  • references/responsive-design.md
  • references/animations.md
  • references/performance.md
  • references/accessibility.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「tailwind-css-patterns」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-c4e8ad2e5bbc5a54-Tailwind-Css-Patterns.html
请存为 .cursor/skills/tailwind-css-patterns/SKILL.md 或 .claude/skills/tailwind-css-patterns/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/giuseppe-trisciuoglio/developer-kit 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/giuseppe-trisciuoglio/developer-kit' --list

npx skills add 'https://github.com/giuseppe-trisciuoglio/developer-kit' --skill 'tailwind-css-patterns'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: tailwind-css-patterns description: 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. allowed-tools: Read, Write, Edit, Glob, Grep, Bash --- # 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 | Prefix | Min Width | Description | |--------|-----------|-------------| | `sm:` | 640px | Small screens | | `md:` | 768px | Tablets | | `lg:` | 1024px | Desktops | | `xl:` | 1280px | Large screens | | `2xl:` | 1536px | Extra large | ### Common Patterns ```html
Content

Title

Description

``` ## 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 ```tsx function ProductCard({ product }: { product: Product }) { return (

{product.name}

Add to Cart
); } ``` ### Dark Mode Toggle ```html

Title

``` ### Form Input ```html ``` ## 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 `` 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 - **[references/layout-patterns.md](references/layout-patterns.md)** — Flexbox, grid, spacing, typography, colors - **[references/component-patterns.md](references/component-patterns.md)** — Cards, navigation, forms, modals, React patterns - **[references/responsive-design.md](references/responsive-design.md)** — Responsive patterns, dark mode, container queries - **[references/animations.md](references/animations.md)** — Transitions, transforms, built-in animations, motion preferences - **[references/performance.md](references/performance.md)** — Bundle optimization, CSS optimization, production builds - **[references/accessibility.md](references/accessibility.md)** — Focus management, screen readers, color contrast, ARIA - **[references/configuration.md](references/configuration.md)** — CSS-first config, JavaScript config, plugins, presets - **[references/reference.md](references/reference.md)** — Additional reference materials ## External Resources - [Tailwind CSS Docs](https://tailwindcss.com/docs) - [Tailwind UI](https://tailwindui.com) - [Tailwind Play](https://play.tailwindcss.com)

相关技能

设计创意

Automation Workflows

设计和实施自动化工作流程,以节省时间和规模化操作作为独家. 用于识别重复任务实现自动化,构建跨工具的工作流程,设置触发器和行动,或优化现有自动化. 包括自动化机会识别,工作流程设计,工具选择(Zapier,Make,n8n),测试,和维护. 触发"自动","自动","工作流程自动…

设计创意

Ui Ux Pro Max

UI/UX设计智能及建筑抛光接口实施指导. 当用户要求UI设计,UX流量,信息架构,视觉风格方向,设计系统/托盘,组件规格,副本/显微镜,可访问性,或生成/critique/refine前端UI(HTML/CSS/JS,React,Next.js,Vue,Svelte,Tailw…

设计创意

Frontend Design

创建美丽现代UI的专家前端设计指南. 在构建起落架页面,仪表板,或任何用户界面时使用.

设计创意

N8n Workflow Automation

设计和输出 n8n 工作流程 JSON 有强力触发器, idempotency, 错误处理, 记录, 重试, 以及 人入"一站"审查队列. 当您需要可审计的自动化时使用.