Loading...
Loading...
Create distinctive, production-grade frontend interfaces using Tailwind CSS with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, Astro projects, or when styling/beautifying any web UI). Optimized for Astro + React tech stack. Generates creative, polished code and UI design that avoids generic AI aesthetics.
npx skill4agent add mokbhai/claude frontend-design# Install dependencies
npm install tailwindcss @tailwindcss/vite
# Configure astro.config.mjs
import { defineConfig } from "astro/config";
import tailwindcss from "@tailwindcss/vite";
import react from "@astrojs/react";
export default defineConfig({
integrations: [react()],
vite: {
plugins: [tailwindcss()],
},
});/* src/styles/global.css */
@import "tailwindcss";
/* Optional: Customize with @theme */
@theme {
--font-display: "Display Font", sans-serif;
--color-brand-500: oklch(0.7 0.15 250);
--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}<!-- Import in your Astro component -->
---
import "../styles/global.css";
---font-*@theme@theme {
--font-display: "Bebas Neue", sans-serif;
--font-body: "Instrument Sans", sans-serif;
}// Apply distinctive font pairings
<h1 className="font-display text-6xl tracking-tight">
{/* Display font for headlines */}
</h1>
<p className="font-body text-lg leading-relaxed">
{/* Body font for content */}
</p>tracking-*leading-*font-weightfont-stretch@theme {
/* Define custom colors using OKLCH */
--color-primary-50: oklch(0.98 0.02 250);
--color-primary-500: oklch(0.65 0.18 250);
--color-primary-600: oklch(0.55 0.20 250);
/* Accent color */
--color-accent: oklch(0.75 0.15 40);
/* Dark mode variants */
--color-surface-dark: oklch(0.2 0.01 250);
--color-text-dark: oklch(0.95 0.01 250);
}// Apply colors with intent
<div className="bg-primary-500 text-white hover:bg-primary-600 transition-colors">
<div className="bg-accent/20"> {/* With opacity */}
Dominant colors with sharp accents
</div>
</div>/50/20color-mix()@starting-style// Staggered page load animations
<div className="space-y-4">
{items.map((item, i) => (
<div
key={i}
className="opacity-0 translate-y-8 animate-in fade-in slide-in-from-bottom-8"
style={{ animationDelay: `${i * 100}ms` }}
>
{item.content}
</div>
))}
</div>
// Hover micro-interactions
<button className="transform hover:scale-105 active:scale-95 transition-transform duration-300 ease-out">
Click me
</button>
// @starting-style for enter animations (v4.1+)
<div className="starting:opacity-0 starting:scale-95 opacity-100 scale-100 transition-all duration-500">
{/* Smooth enter animation */}
</div>transition-*duration-*ease-*delay-*grouppeerscroll-*// Asymmetrical grid-breaking layout
<div className="grid grid-cols-12 gap-4">
<div className="col-span-7 col-start-2">
{/* Off-center main content */}
</div>
<div className="col-span-4 col-start-10 -mt-12">
{/* Overlapping element */}
</div>
</div>
// Container queries for component-level responsiveness
<div className="@container">
<div className="grid grid-cols-1 @sm:grid-cols-3 @lg:grid-cols-4">
{/* Responsive to container, not viewport */}
</div>
</div>
// Generous negative space
<div className="max-w-2xl mx-auto px-8 py-24">
{/* Focused, breathing room */}
</div>col-span-*col-start-*-mt-*-mb-*gap-*@container@sm:*@lg:*p-*px-*py-*// Conic gradient (new in v4)
<div className="bg-conic from-blue-500 to-purple-500">
{/* Dramatic conic gradient */}
</div>
// Radial gradient with positioning
<div className="bg-radial-[at_25%_25%] from-white to-zinc-900 to-75%">
{/* Custom radial gradient */}
</div>
// OKLCH gradient interpolation
<div className="bg-linear-to-r/oklch from-orange-500 to-blue-500">
{/* Vivid gradient interpolation */}
</div>
// Text shadows (new in v4.1)
<h1 className="text-shadow-lg text-shadow-color-white/50">
{/* Layered text shadows */}
</h1>
// Mask effects (new in v4.1)
<div className="mask-image-gradient-to-t from-black to-transparent">
{/* Gradient mask */}
</div>
// Complex layered effects
<div className="relative bg-zinc-900 overflow-hidden">
<div className="absolute inset-0 bg-gradient-to-br from-purple-500/20 via-transparent to-blue-500/20" />
<div className="absolute inset-0 bg-[url('/noise.png')] opacity-10" />
<div className="relative z-10">
{/* Content on top */}
</div>
</div>bg-*/oklch/backdrop-blur-*shadow-*inset-shadow-*mask-image-*<div className="@container">
<div className="@max-md:grid-cols-1 @min-md:grid-cols-3">
{/* Responsive to container */}
</div>
</div><div className="perspective-distant">
<div className="rotate-x-12 rotate-z-45 transform-3d">
{/* 3D effect */}
</div>
</div><div className="not-hover:opacity-75 hover:opacity-100">
{/* Only when not hovering */}
</div><textarea className="field-sizing-auto" />
{/* Auto-resizing without JS */}
</div>