[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EP0JG38HMK47CX214B0QCS":3,"skill-same:01M6EP0JG38HMK47CX214B0QCS":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":43,"repositoryHtmlUrl":44,"repositoryHomepageUrl":45,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M6EP0JG38HMK47CX214B0QCS","web-styling",null,"Styling patterns for React web applications. Use when working with Tailwind CSS, CSS Modules, theming, responsive design, or component styling.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcjharmath\u002Fweb-styling\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],"web","styling","web styling","design","css","react","component","applications","Tailwind","use","modules","responsive design","patterns","Tailwind CSS","responsive","react web","2026-11-10 10:12:30",false,"---\nname: web-styling\ndescription: Styling patterns for React web applications. Use when working with Tailwind CSS, CSS Modules, theming, responsive design, or component styling.\n---\n\n# Web Styling (React)\n\n## Tailwind CSS\n\n### Basic Usage\n\n```typescript\nfunction Button({ variant = 'primary', children }) {\n  const baseClasses = 'px-4 py-2 rounded-lg font-medium transition-colors';\n\n  const variants = {\n    primary: 'bg-blue-600 text-white hover:bg-blue-700',\n    secondary: 'bg-gray-200 text-gray-800 hover:bg-gray-300',\n    danger: 'bg-red-600 text-white hover:bg-red-700',\n  };\n\n  return (\n    \u003Cbutton className={`${baseClasses} ${variants[variant]}`}>\n      {children}\n    \u003C\u002Fbutton>\n  );\n}\n```\n\n### Conditional Classes with clsx\u002Fcn\n\n```typescript\nimport { clsx } from 'clsx';\n\u002F\u002F or with tailwind-merge for deduplication\nimport { twMerge } from 'tailwind-merge';\n\nfunction cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n\nfunction Card({ isActive, isDisabled, className, children }) {\n  return (\n    \u003Cdiv\n      className={cn(\n        'p-4 rounded-lg border',\n        isActive && 'border-blue-500 bg-blue-50',\n        isDisabled && 'opacity-50 cursor-not-allowed',\n        className \u002F\u002F Allow overrides\n      )}\n    >\n      {children}\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n### Responsive Design\n\n```typescript\n\u002F\u002F Mobile-first breakpoints\n\u002F\u002F sm: 640px, md: 768px, lg: 1024px, xl: 1280px, 2xl: 1536px\n\n\u003Cdiv className=\"\n  grid\n  grid-cols-1      \u002F* Mobile: 1 column *\u002F\n  sm:grid-cols-2   \u002F* Tablet: 2 columns *\u002F\n  lg:grid-cols-3   \u002F* Desktop: 3 columns *\u002F\n  xl:grid-cols-4   \u002F* Large: 4 columns *\u002F\n  gap-4\n\">\n  {items.map(item => \u003CCard key={item.id} {...item} \u002F>)}\n\u003C\u002Fdiv>\n\n\u002F\u002F Responsive text\n\u003Ch1 className=\"text-2xl md:text-3xl lg:text-4xl font-bold\">\n  Title\n\u003C\u002Fh1>\n\n\u002F\u002F Hide\u002Fshow at breakpoints\n\u003Cnav className=\"hidden md:flex\">Desktop Nav\u003C\u002Fnav>\n\u003Cnav className=\"flex md:hidden\">Mobile Nav\u003C\u002Fnav>\n```\n\n### Dark Mode\n\n```typescript\n\u002F\u002F tailwind.config.js\nmodule.exports = {\n  darkMode: 'class', \u002F\u002F or 'media' for OS preference\n  \u002F\u002F ...\n};\n\n\u002F\u002F Component\n\u003Cdiv className=\"bg-white dark:bg-gray-900 text-gray-900 dark:text-white\">\n  \u003Ch1 className=\"text-black dark:text-white\">Title\u003C\u002Fh1>\n  \u003Cp className=\"text-gray-600 dark:text-gray-400\">Description\u003C\u002Fp>\n\u003C\u002Fdiv>\n\n\u002F\u002F Toggle dark mode\nfunction ThemeToggle() {\n  const [isDark, setIsDark] = useState(false);\n\n  useEffect(() => {\n    document.documentElement.classList.toggle('dark', isDark);\n  }, [isDark]);\n\n  return (\n    \u003Cbutton onClick={() => setIsDark(!isDark)}>\n      {isDark ? '☀️' : '?'}\n    \u003C\u002Fbutton>\n  );\n}\n```\n\n### Custom Design Tokens\n\n```javascript\n\u002F\u002F tailwind.config.js\nmodule.exports = {\n  theme: {\n    extend: {\n      colors: {\n        brand: {\n          50: '#f0f9ff',\n          100: '#e0f2fe',\n          500: '#0ea5e9',\n          600: '#0284c7',\n          700: '#0369a1',\n        },\n      },\n      fontFamily: {\n        sans: ['Inter', 'system-ui', 'sans-serif'],\n      },\n      spacing: {\n        '18': '4.5rem',\n        '88': '22rem',\n      },\n    },\n  },\n};\n```\n\n```typescript\n\u002F\u002F Usage\n\u003Cbutton className=\"bg-brand-500 hover:bg-brand-600\">\n  Brand Button\n\u003C\u002Fbutton>\n```\n\n---\n\n## CSS Modules\n\n### Basic Usage\n\n```css\n\u002F* Button.module.css *\u002F\n.button {\n  padding: 0.5rem 1rem;\n  border-radius: 0.5rem;\n  font-weight: 500;\n}\n\n.primary {\n  background-color: #3b82f6;\n  color: white;\n}\n\n.secondary {\n  background-color: #e5e7eb;\n  color: #1f2937;\n}\n```\n\n```typescript\n\u002F\u002F Button.tsx\nimport styles from '.\u002FButton.module.css';\n\nfunction Button({ variant = 'primary', children }) {\n  return (\n    \u003Cbutton className={`${styles.button} ${styles[variant]}`}>\n      {children}\n    \u003C\u002Fbutton>\n  );\n}\n```\n\n### With clsx\n\n```typescript\nimport styles from '.\u002FCard.module.css';\nimport { clsx } from 'clsx';\n\nfunction Card({ isActive, className, children }) {\n  return (\n    \u003Cdiv\n      className={clsx(\n        styles.card,\n        isActive && styles.active,\n        className\n      )}\n    >\n      {children}\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n---\n\n## CSS-in-JS (styled-components)\n\n```typescript\nimport styled from 'styled-components';\n\nconst Button = styled.button\u003C{ variant?: 'primary' | 'secondary' }>`\n  padding: 0.5rem 1rem;\n  border-radius: 0.5rem;\n  font-weight: 500;\n  transition: background-color 0.2s;\n\n  ${({ variant = 'primary' }) =>\n    variant === 'primary'\n      ? `\n        background-color: #3b82f6;\n        color: white;\n        &:hover {\n          background-color: #2563eb;\n        }\n      `\n      : `\n        background-color: #e5e7eb;\n        color: #1f2937;\n        &:hover {\n          background-color: #d1d5db;\n        }\n      `}\n`;\n\n\u002F\u002F With theme\nimport { ThemeProvider } from 'styled-components';\n\nconst theme = {\n  colors: {\n    primary: '#3b82f6',\n    secondary: '#e5e7eb',\n  },\n  spacing: {\n    sm: '0.5rem',\n    md: '1rem',\n  },\n};\n\nconst ThemedButton = styled.button`\n  background-color: ${({ theme }) => theme.colors.primary};\n  padding: ${({ theme }) => theme.spacing.md};\n`;\n```\n\n---\n\n## Component Variants Pattern\n\n```typescript\n\u002F\u002F Using cva (class-variance-authority) with Tailwind\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nconst buttonVariants = cva(\n  'inline-flex items-center justify-center rounded-md font-medium transition-colors',\n  {\n    variants: {\n      variant: {\n        primary: 'bg-blue-600 text-white hover:bg-blue-700',\n        secondary: 'bg-gray-100 text-gray-900 hover:bg-gray-200',\n        outline: 'border border-gray-300 hover:bg-gray-50',\n        ghost: 'hover:bg-gray-100',\n        danger: 'bg-red-600 text-white hover:bg-red-700',\n      },\n      size: {\n        sm: 'h-8 px-3 text-sm',\n        md: 'h-10 px-4',\n        lg: 'h-12 px-6 text-lg',\n      },\n    },\n    defaultVariants: {\n      variant: 'primary',\n      size: 'md',\n    },\n  }\n);\n\ninterface ButtonProps\n  extends React.ButtonHTMLAttributes\u003CHTMLButtonElement>,\n    VariantProps\u003Ctypeof buttonVariants> {}\n\nfunction Button({ variant, size, className, ...props }: ButtonProps) {\n  return (\n    \u003Cbutton\n      className={cn(buttonVariants({ variant, size }), className)}\n      {...props}\n    \u002F>\n  );\n}\n\n\u002F\u002F Usage\n\u003CButton variant=\"primary\" size=\"lg\">Large Primary\u003C\u002FButton>\n\u003CButton variant=\"outline\">Outline\u003C\u002FButton>\n```\n\n---\n\n## Animation Patterns\n\n### Tailwind Animations\n\n```typescript\n\u002F\u002F Built-in animations\n\u003Cdiv className=\"animate-spin\">Loading...\u003C\u002Fdiv>\n\u003Cdiv className=\"animate-pulse\">Loading...\u003C\u002Fdiv>\n\u003Cdiv className=\"animate-bounce\">Scroll down\u003C\u002Fdiv>\n\n\u002F\u002F Transitions\n\u003Cbutton className=\"transition-all duration-200 hover:scale-105\">\n  Hover me\n\u003C\u002Fbutton>\n\n\u002F\u002F Custom animation in tailwind.config.js\nmodule.exports = {\n  theme: {\n    extend: {\n      animation: {\n        'fade-in': 'fadeIn 0.3s ease-out',\n        'slide-up': 'slideUp 0.3s ease-out',\n      },\n      keyframes: {\n        fadeIn: {\n          '0%': { opacity: '0' },\n          '100%': { opacity: '1' },\n        },\n        slideUp: {\n          '0%': { transform: 'translateY(10px)', opacity: '0' },\n          '100%': { transform: 'translateY(0)', opacity: '1' },\n        },\n      },\n    },\n  },\n};\n\n\u002F\u002F Usage\n\u003Cdiv className=\"animate-fade-in\">Fading in...\u003C\u002Fdiv>\n```\n\n### Framer Motion\n\n```typescript\nimport { motion, AnimatePresence } from 'framer-motion';\n\nfunction Modal({ isOpen, onClose, children }) {\n  return (\n    \u003CAnimatePresence>\n      {isOpen && (\n        \u003C>\n          \u003Cmotion.div\n            initial={{ opacity: 0 }}\n            animate={{ opacity: 1 }}\n            exit={{ opacity: 0 }}\n            className=\"fixed inset-0 bg-black\u002F50\"\n            onClick={onClose}\n          \u002F>\n          \u003Cmotion.div\n            initial={{ opacity: 0, scale: 0.95, y: 20 }}\n            animate={{ opacity: 1, scale: 1, y: 0 }}\n            exit={{ opacity: 0, scale: 0.95, y: 20 }}\n            className=\"fixed inset-x-4 top-1\u002F2 -translate-y-1\u002F2 bg-white rounded-lg p-6\"\n          >\n            {children}\n          \u003C\u002Fmotion.div>\n        \u003C\u002F>\n      )}\n    \u003C\u002FAnimatePresence>\n  );\n}\n```\n\n---\n\n## Layout Patterns\n\n### Flexbox\n\n```typescript\n\u002F\u002F Centering\n\u003Cdiv className=\"flex items-center justify-center min-h-screen\">\n  \u003CCard>Centered content\u003C\u002FCard>\n\u003C\u002Fdiv>\n\n\u002F\u002F Space between\n\u003Cdiv className=\"flex items-center justify-between\">\n  \u003CLogo \u002F>\n  \u003CNavigation \u002F>\n  \u003CUserMenu \u002F>\n\u003C\u002Fdiv>\n\n\u002F\u002F Responsive direction\n\u003Cdiv className=\"flex flex-col md:flex-row gap-4\">\n  \u003CSidebar \u002F>\n  \u003CMain \u002F>\n\u003C\u002Fdiv>\n```\n\n### Grid\n\n```typescript\n\u002F\u002F Equal columns\n\u003Cdiv className=\"grid grid-cols-3 gap-4\">\n  {items.map(item => \u003CCard key={item.id} {...item} \u002F>)}\n\u003C\u002Fdiv>\n\n\u002F\u002F Complex layout\n\u003Cdiv className=\"grid grid-cols-12 gap-4\">\n  \u003Caside className=\"col-span-3\">Sidebar\u003C\u002Faside>\n  \u003Cmain className=\"col-span-6\">Main content\u003C\u002Fmain>\n  \u003Caside className=\"col-span-3\">Right sidebar\u003C\u002Faside>\n\u003C\u002Fdiv>\n\n\u002F\u002F Auto-fit for unknown count\n\u003Cdiv className=\"grid grid-cols-[repeat(auto-fit,minmax(250px,1fr))] gap-4\">\n  {items.map(item => \u003CCard key={item.id} {...item} \u002F>)}\n\u003C\u002Fdiv>\n```\n\n### Container\n\n```typescript\n\u002F\u002F Centered container with max-width\n\u003Cdiv className=\"container mx-auto px-4\">\n  \u003CContent \u002F>\n\u003C\u002Fdiv>\n\n\u002F\u002F Or with custom max-width\n\u003Cdiv className=\"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8\">\n  \u003CContent \u002F>\n\u003C\u002Fdiv>\n```\n\n---\n\n## Theming System\n\n```typescript\n\u002F\u002F theme.ts\nexport const theme = {\n  colors: {\n    primary: {\n      50: '#eff6ff',\n      500: '#3b82f6',\n      600: '#2563eb',\n      700: '#1d4ed8',\n    },\n    gray: {\n      50: '#f9fafb',\n      100: '#f3f4f6',\n      900: '#111827',\n    },\n  },\n  spacing: {\n    xs: '0.25rem',\n    sm: '0.5rem',\n    md: '1rem',\n    lg: '1.5rem',\n    xl: '2rem',\n  },\n} as const;\n\n\u002F\u002F CSS Variables approach\n:root {\n  --color-primary: #3b82f6;\n  --color-background: #ffffff;\n  --color-text: #111827;\n}\n\n.dark {\n  --color-primary: #60a5fa;\n  --color-background: #111827;\n  --color-text: #f9fafb;\n}\n\n\u002F\u002F Usage with Tailwind\n\u003Cdiv className=\"bg-[var(--color-background)] text-[var(--color-text)]\">\n  Content\n\u003C\u002Fdiv>\n```\n\n---\n\n## Common Issues\n\n| Issue | Solution |\n|-------|----------|\n| Styles not applying | Check class specificity, Tailwind purging |\n| Dark mode flicker | Use CSS variables or SSR-safe approach |\n| Layout shift | Set explicit dimensions, use skeleton loaders |\n| Mobile overflow | Add `overflow-x-hidden` to body |\n| Z-index conflicts | Use consistent z-index scale |\n\n---\n\n## File Structure\n\n```\nstyles\u002F\n  globals.css          # Global styles, Tailwind imports\n  variables.css        # CSS custom properties\ncomponents\u002F\n  Button\u002F\n    Button.tsx\n    Button.module.css  # If using CSS Modules\n    index.ts\ntailwind.config.js     # Tailwind configuration\n```\n","# Web Styling (React)\n\n## Tailwind CSS\n\n### Basic Usage\n\n```typescript\nfunction Button({ variant = 'primary', children }) {\n  const baseClasses = 'px-4 py-2 rounded-lg font-medium transition-colors';\n\n  const variants = {\n    primary: 'bg-blue-600 text-white hover:bg-blue-700',\n    secondary: 'bg-gray-200 text-gray-800 hover:bg-gray-300',\n    danger: 'bg-red-600 text-white hover:bg-red-700',\n  };\n\n  return (\n    \u003Cbutton className={`${baseClasses} ${variants[variant]}`}>\n      {children}\n    \u003C\u002Fbutton>\n  );\n}\n```\n\n### Conditional Classes with clsx\u002Fcn\n\n```typescript\nimport { clsx } from 'clsx';\n\u002F\u002F or with tailwind-merge for deduplication\nimport { twMerge } from 'tailwind-merge';\n\nfunction cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n\nfunction Card({ isActive, isDisabled, className, children }) {\n  return (\n    \u003Cdiv\n      className={cn(\n        'p-4 rounded-lg border',\n        isActive && 'border-blue-500 bg-blue-50',\n        isDisabled && 'opacity-50 cursor-not-allowed',\n        className \u002F\u002F Allow overrides\n      )}\n    >\n      {children}\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n### Responsive Design\n\n```typescript\n\u002F\u002F Mobile-first breakpoints\n\u002F\u002F sm: 640px, md: 768px, lg: 1024px, xl: 1280px, 2xl: 1536px\n\n\u003Cdiv className=\"\n  grid\n  grid-cols-1      \u002F* Mobile: 1 column *\u002F\n  sm:grid-cols-2   \u002F* Tablet: 2 columns *\u002F\n  lg:grid-cols-3   \u002F* Desktop: 3 columns *\u002F\n  xl:grid-cols-4   \u002F* Large: 4 columns *\u002F\n  gap-4\n\">\n  {items.map(item => \u003CCard key={item.id} {...item} \u002F>)}\n\u003C\u002Fdiv>\n\n\u002F\u002F Responsive text\n\u003Ch1 className=\"text-2xl md:text-3xl lg:text-4xl font-bold\">\n  Title\n\u003C\u002Fh1>\n\n\u002F\u002F Hide\u002Fshow at breakpoints\n\u003Cnav className=\"hidden md:flex\">Desktop Nav\u003C\u002Fnav>\n\u003Cnav className=\"flex md:hidden\">Mobile Nav\u003C\u002Fnav>\n```\n\n### Dark Mode\n\n```typescript\n\u002F\u002F tailwind.config.js\nmodule.exports = {\n  darkMode: 'class', \u002F\u002F or 'media' for OS preference\n  \u002F\u002F ...\n};\n\n\u002F\u002F Component\n\u003Cdiv className=\"bg-white dark:bg-gray-900 text-gray-900 dark:text-white\">\n  \u003Ch1 className=\"text-black dark:text-white\">Title\u003C\u002Fh1>\n  \u003Cp className=\"text-gray-600 dark:text-gray-400\">Description\u003C\u002Fp>\n\u003C\u002Fdiv>\n\n\u002F\u002F Toggle dark mode\nfunction ThemeToggle() {\n  const [isDark, setIsDark] = useState(false);\n\n  useEffect(() => {\n    document.documentElement.classList.toggle('dark', isDark);\n  }, [isDark]);\n\n  return (\n    \u003Cbutton onClick={() => setIsDark(!isDark)}>\n      {isDark ? '☀️' : '?'}\n    \u003C\u002Fbutton>\n  );\n}\n```\n\n### Custom Design Tokens\n\n```javascript\n\u002F\u002F tailwind.config.js\nmodule.exports = {\n  theme: {\n    extend: {\n      colors: {\n        brand: {\n          50: '#f0f9ff',\n          100: '#e0f2fe',\n          500: '#0ea5e9',\n          600: '#0284c7',\n          700: '#0369a1',\n        },\n      },\n      fontFamily: {\n        sans: ['Inter', 'system-ui', 'sans-serif'],\n      },\n      spacing: {\n        '18': '4.5rem',\n        '88': '22rem',\n      },\n    },\n  },\n};\n```\n\n```typescript\n\u002F\u002F Usage\n\u003Cbutton className=\"bg-brand-500 hover:bg-brand-600\">\n  Brand Button\n\u003C\u002Fbutton>\n```\n\n---\n\n## CSS Modules\n\n### Basic Usage\n\n```css\n\u002F* Button.module.css *\u002F\n.button {\n  padding: 0.5rem 1rem;\n  border-radius: 0.5rem;\n  font-weight: 500;\n}\n\n.primary {\n  background-color: #3b82f6;\n  color: white;\n}\n\n.secondary {\n  background-color: #e5e7eb;\n  color: #1f2937;\n}\n```\n\n```typescript\n\u002F\u002F Button.tsx\nimport styles from '.\u002FButton.module.css';\n\nfunction Button({ variant = 'primary', children }) {\n  return (\n    \u003Cbutton className={`${styles.button} ${styles[variant]}`}>\n      {children}\n    \u003C\u002Fbutton>\n  );\n}\n```\n\n### With clsx\n\n```typescript\nimport styles from '.\u002FCard.module.css';\nimport { clsx } from 'clsx';\n\nfunction Card({ isActive, className, children }) {\n  return (\n    \u003Cdiv\n      className={clsx(\n        styles.card,\n        isActive && styles.active,\n        className\n      )}\n    >\n      {children}\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n---\n\n## CSS-in-JS (styled-components)\n\n```typescript\nimport styled from 'styled-components';\n\nconst Button = styled.button\u003C{ variant?: 'primary' | 'secondary' }>`\n  padding: 0.5rem 1rem;\n  border-radius: 0.5rem;\n  font-weight: 500;\n  transition: background-color 0.2s;\n\n  ${({ variant = 'primary' }) =>\n    variant === 'primary'\n      ? `\n        background-color: #3b82f6;\n        color: white;\n        &:hover {\n          background-color: #2563eb;\n        }\n      `\n      : `\n        background-color: #e5e7eb;\n        color: #1f2937;\n        &:hover {\n          background-color: #d1d5db;\n        }\n      `}\n`;\n\n\u002F\u002F With theme\nimport { ThemeProvider } from 'styled-components';\n\nconst theme = {\n  colors: {\n    primary: '#3b82f6',\n    secondary: '#e5e7eb',\n  },\n  spacing: {\n    sm: '0.5rem',\n    md: '1rem',\n  },\n};\n\nconst ThemedButton = styled.button`\n  background-color: ${({ theme }) => theme.colors.primary};\n  padding: ${({ theme }) => theme.spacing.md};\n`;\n```\n\n---\n\n## Component Variants Pattern\n\n```typescript\n\u002F\u002F Using cva (class-variance-authority) with Tailwind\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nconst buttonVariants = cva(\n  'inline-flex items-center justify-center rounded-md font-medium transition-colors',\n  {\n    variants: {\n      variant: {\n        primary: 'bg-blue-600 text-white hover:bg-blue-700',\n        secondary: 'bg-gray-100 text-gray-900 hover:bg-gray-200',\n        outline: 'border border-gray-300 hover:bg-gray-50',\n        ghost: 'hover:bg-gray-100',\n        danger: 'bg-red-600 text-white hover:bg-red-700',\n      },\n      size: {\n        sm: 'h-8 px-3 text-sm',\n        md: 'h-10 px-4',\n        lg: 'h-12 px-6 text-lg',\n      },\n    },\n    defaultVariants: {\n      variant: 'primary',\n      size: 'md',\n    },\n  }\n);\n\ninterface ButtonProps\n  extends React.ButtonHTMLAttributes\u003CHTMLButtonElement>,\n    VariantProps\u003Ctypeof buttonVariants> {}\n\nfunction Button({ variant, size, className, ...props }: ButtonProps) {\n  return (\n    \u003Cbutton\n      className={cn(buttonVariants({ variant, size }), className)}\n      {...props}\n    \u002F>\n  );\n}\n\n\u002F\u002F Usage\n\u003CButton variant=\"primary\" size=\"lg\">Large Primary\u003C\u002FButton>\n\u003CButton variant=\"outline\">Outline\u003C\u002FButton>\n```\n\n---\n\n## Animation Patterns\n\n### Tailwind Animations\n\n```typescript\n\u002F\u002F Built-in animations\n\u003Cdiv className=\"animate-spin\">Loading...\u003C\u002Fdiv>\n\u003Cdiv className=\"animate-pulse\">Loading...\u003C\u002Fdiv>\n\u003Cdiv className=\"animate-bounce\">Scroll down\u003C\u002Fdiv>\n\n\u002F\u002F Transitions\n\u003Cbutton className=\"transition-all duration-200 hover:scale-105\">\n  Hover me\n\u003C\u002Fbutton>\n\n\u002F\u002F Custom animation in tailwind.config.js\nmodule.exports = {\n  theme: {\n    extend: {\n      animation: {\n        'fade-in': 'fadeIn 0.3s ease-out',\n        'slide-up': 'slideUp 0.3s ease-out',\n      },\n      keyframes: {\n        fadeIn: {\n          '0%': { opacity: '0' },\n          '100%': { opacity: '1' },\n        },\n        slideUp: {\n          '0%': { transform: 'translateY(10px)', opacity: '0' },\n          '100%': { transform: 'translateY(0)', opacity: '1' },\n        },\n      },\n    },\n  },\n};\n\n\u002F\u002F Usage\n\u003Cdiv className=\"animate-fade-in\">Fading in...\u003C\u002Fdiv>\n```\n\n### Framer Motion\n\n```typescript\nimport { motion, AnimatePresence } from 'framer-motion';\n\nfunction Modal({ isOpen, onClose, children }) {\n  return (\n    \u003CAnimatePresence>\n      {isOpen && (\n        \u003C>\n          \u003Cmotion.div\n            initial={{ opacity: 0 }}\n            animate={{ opacity: 1 }}\n            exit={{ opacity: 0 }}\n            className=\"fixed inset-0 bg-black\u002F50\"\n            onClick={onClose}\n          \u002F>\n          \u003Cmotion.div\n            initial={{ opacity: 0, scale: 0.95, y: 20 }}\n            animate={{ opacity: 1, scale: 1, y: 0 }}\n            exit={{ opacity: 0, scale: 0.95, y: 20 }}\n            className=\"fixed inset-x-4 top-1\u002F2 -translate-y-1\u002F2 bg-white rounded-lg p-6\"\n          >\n            {children}\n          \u003C\u002Fmotion.div>\n        \u003C\u002F>\n      )}\n    \u003C\u002FAnimatePresence>\n  );\n}\n```\n\n---\n\n## Layout Patterns\n\n### Flexbox\n\n```typescript\n\u002F\u002F Centering\n\u003Cdiv className=\"flex items-center justify-center min-h-screen\">\n  \u003CCard>Centered content\u003C\u002FCard>\n\u003C\u002Fdiv>\n\n\u002F\u002F Space between\n\u003Cdiv className=\"flex items-center justify-between\">\n  \u003CLogo \u002F>\n  \u003CNavigation \u002F>\n  \u003CUserMenu \u002F>\n\u003C\u002Fdiv>\n\n\u002F\u002F Responsive direction\n\u003Cdiv className=\"flex flex-col md:flex-row gap-4\">\n  \u003CSidebar \u002F>\n  \u003CMain \u002F>\n\u003C\u002Fdiv>\n```\n\n### Grid\n\n```typescript\n\u002F\u002F Equal columns\n\u003Cdiv className=\"grid grid-cols-3 gap-4\">\n  {items.map(item => \u003CCard key={item.id} {...item} \u002F>)}\n\u003C\u002Fdiv>\n\n\u002F\u002F Complex layout\n\u003Cdiv className=\"grid grid-cols-12 gap-4\">\n  \u003Caside className=\"col-span-3\">Sidebar\u003C\u002Faside>\n  \u003Cmain className=\"col-span-6\">Main content\u003C\u002Fmain>\n  \u003Caside className=\"col-span-3\">Right sidebar\u003C\u002Faside>\n\u003C\u002Fdiv>\n\n\u002F\u002F Auto-fit for unknown count\n\u003Cdiv className=\"grid grid-cols-[repeat(auto-fit,minmax(250px,1fr))] gap-4\">\n  {items.map(item => \u003CCard key={item.id} {...item} \u002F>)}\n\u003C\u002Fdiv>\n```\n\n### Container\n\n```typescript\n\u002F\u002F Centered container with max-width\n\u003Cdiv className=\"container mx-auto px-4\">\n  \u003CContent \u002F>\n\u003C\u002Fdiv>\n\n\u002F\u002F Or with custom max-width\n\u003Cdiv className=\"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8\">\n  \u003CContent \u002F>\n\u003C\u002Fdiv>\n```\n\n---\n\n## Theming System\n\n```typescript\n\u002F\u002F theme.ts\nexport const theme = {\n  colors: {\n    primary: {\n      50: '#eff6ff',\n      500: '#3b82f6',\n      600: '#2563eb',\n      700: '#1d4ed8',\n    },\n    gray: {\n      50: '#f9fafb',\n      100: '#f3f4f6',\n      900: '#111827',\n    },\n  },\n  spacing: {\n    xs: '0.25rem',\n    sm: '0.5rem',\n    md: '1rem',\n    lg: '1.5rem',\n    xl: '2rem',\n  },\n} as const;\n\n\u002F\u002F CSS Variables approach\n:root {\n  --color-primary: #3b82f6;\n  --color-background: #ffffff;\n  --color-text: #111827;\n}\n\n.dark {\n  --color-primary: #60a5fa;\n  --color-background: #111827;\n  --color-text: #f9fafb;\n}\n\n\u002F\u002F Usage with Tailwind\n\u003Cdiv className=\"bg-[var(--color-background)] text-[var(--color-text)]\">\n  Content\n\u003C\u002Fdiv>\n```\n\n---\n\n## Common Issues\n\n| Issue | Solution |\n|-------|----------|\n| Styles not applying | Check class specificity, Tailwind purging |\n| Dark mode flicker | Use CSS variables or SSR-safe approach |\n| Layout shift | Set explicit dimensions, use skeleton loaders |\n| Mobile overflow | Add `overflow-x-hidden` to body |\n| Z-index conflicts | Use consistent z-index scale |\n\n---\n\n## File Structure\n\n```\nstyles\u002F\n  globals.css          # Global styles, Tailwind imports\n  variables.css        # CSS custom properties\ncomponents\u002F\n  Button\u002F\n    Button.tsx\n    Button.module.css  # If using CSS Modules\n    index.ts\ntailwind.config.js     # Tailwind configuration\n```\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fcjharmath\u002Fweb-styling",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill web-styling",{"tool":55,"command":56},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill web-styling",{"tool":58,"command":59},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill web-styling","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcjharmath\u002Fweb-styling\u002FSKILL.md",true,[63],{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"skill-report.json","REFERENCE","参考文档",13857,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcjharmath\u002Fweb-styling\u002Fskill-report.json",[70,79,88,97,103,109],{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":35},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[76,77,78],"model","model hierarchy","model hierarchy skill",{"skillNo":80,"name":81,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":35},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[85,86,87],"MCP","zoom","zoom mcp",{"skillNo":89,"name":90,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":35},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[94,95,96,86],"sdk","zoom apps sdk","apps",{"skillNo":98,"name":99,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":35},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[99],{"skillNo":104,"name":105,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":35},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[105],{"skillNo":110,"name":111,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":35},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[111]]