--- name: frontier-ui description: > Frontier Code UI standards based on Hero section patterns (dark theme, cyan/purple accents, gradients, glowing effects). Trigger: When creating/modifying UI components, sections, or visual elements. license: Apache-2.0 metadata: author: frontier-code version: "1.0" scope: [root] auto_invoke: "Creating/modifying UI components, sections, or visual elements" --- ## When to Use - Creating or modifying any UI component (buttons, cards, sections, etc.) - Designing new page sections - Adding interactive elements with hover states - Implementing typography and color schemes - Creating visual effects (glows, gradients, animations) - Working with responsive layouts ## Critical Patterns ### Color Palette **Backgrounds** (Dark Theme) - Primary: `bg-slate-950` (darkest) - Secondary: `bg-slate-900`, `bg-slate-800` - Accents: `bg-slate-800/50` (semi-transparent) **Accent Colors** - Primary: `cyan` (cyan-500, cyan-400, cyan-300) - Secondary: `purple` (purple-500, purple-400) - Success: `green` (green-400, green-500) - Info: `blue` (blue-500) - Warning: `orange` (orange-500) - Error: `pink` (pink-500) **Text Colors** - Primary: `text-slate-300`, `text-white` - Secondary: `text-slate-400` - Muted: `text-slate-500` ### Gradients **Text Gradients** ```astro Frontier Code ``` **Background Gradients** ```astro
``` ### Typography **Hero Headings** ```astro

Title

``` **Subheadings** ```astro

Subtitle

``` **Body Text** ```astro

Description text

``` **Small Labels** ```astro <Frontier /> ``` **Status Badges** ```astro
Status
``` ### Spacing **Vertical Spacing** - Sections: `py-16 sm:py-20 lg:py-24` - Margin between elements: `mb-8`, `mb-12`, `mb-16` - Gap: `gap-2`, `gap-4`, `gap-8` ### Borders **Subtle Borders** ```astro class="border-2 border-cyan-500/50" class="border border-cyan-500/30" class="hover:border-cyan-400" ``` ### Rounded Corners - Buttons/badges: `rounded-lg` - Circular elements: `rounded-full` ### Shadows & Glows **Text Shadow** ```astro style="text-shadow: 0 0 40px rgba(0, 245, 255, 0.5);" ``` **Blur Effects** ```astro
class="hover:shadow-lg hover:shadow-cyan-500/50" ``` ### Animations **Pulse Animation** ```astro class="animate-pulse" style="animation-delay: 0.2s;" ``` **Bounce Animation** ```astro class="animate-bounce" ``` **Custom Blink (Cursor)** ```astro ``` ### Transitions **Standard Transitions** ```astro class="transition-all duration-300" class="hover:scale-105" class="hover:shadow-lg hover:shadow-cyan-500/50" class="hover:bg-cyan-500/10" class="hover:border-cyan-400 hover:text-cyan-300" class="opacity-0 group-hover:opacity-100 transition-opacity duration-300" ``` ### Buttons **Primary Gradient Button** ```astro
Button Text
``` **Outline Button** ```astro Button Text ``` ### Sections **Hero Section Structure** ```astro
``` **Standard Section** ```astro
``` ### Container Pattern ```astro
``` ### Responsive Design **Always use mobile-first responsive utilities:** ```astro class="py-16 sm:py-20 lg:py-24" class="text-5xl sm:text-6xl md:text-7xl lg:text-8xl" class="flex flex-col sm:flex-row gap-4 justify-center" ``` ### Icons ```astro ``` ## Code Examples ### Complete Badge Component ```astro --- const { label = '', color = 'cyan' } = Astro.props; const colors = { cyan: 'text-cyan-400 border-cyan-500/30 bg-slate-800/50', purple: 'text-purple-400 border-purple-500/30 bg-slate-800/50', green: 'text-green-400 border-green-500/30 bg-slate-800/50' }; --- {label} ``` ### Status Indicator with Delay ```astro --- const { status = '', color = 'green', delay = 0 } = Astro.props; const colors = { green: 'bg-green-500', cyan: 'bg-cyan-500', purple: 'bg-purple-500' }; ---
{status}
``` ## Decision Tree: Which Style to Apply? | Situation | Use | |-----------|-----| | Primary action | Gradient button `from-cyan-500 to-cyan-600` | | Secondary action | Outline button `border-cyan-500/50` | | Headings | Large with text gradient `from-cyan-400 via-cyan-300 to-purple-400` | | Subheadings | Light weight `font-light text-slate-300` | | Labels/badges | Rounded pill `rounded-full` with subtle border | | Background | Dark `bg-slate-950` with gradient overlay | | Glow effects | `bg-{color}/20 rounded-full blur-3xl` | | Hover effects | `hover:scale-105 hover:shadow-lg hover:shadow-{color}/50` | | Grid patterns | `bg-[linear-gradient(...)] bg-[size:50px_50px]` | ## Anti-Patterns ❌ Don't use: - White backgrounds for main sections (use slate-950/slate-900) - Solid colors without gradients for accents - Sharp corners on buttons/badges (use rounded-lg/rounded-full) - Heavy shadows without color tint (use `shadow-{color}/50`) - Text without spacing (add `leading-relaxed`) - Missing responsive utilities (always add `sm:` `md:` `lg:`) ## Commands No specific commands - UI is purely declarative through Tailwind classes. ## Resources - **Examples**: Hero section at `src/components/sections/Hero.astro` - **Color Reference**: Use cyan/purple as primary accents, slate for neutrals - **Animation Library**: Tailwind built-in + custom `@keyframes` for blinking