Aura Brand Implementation Guide

This guide provides specific implementation details for maintaining brand consistency in the Aura frontend codebase.

📁 File Structure

frontend/
├── docs/
│   ├── BRAND_GUIDELINES.md      # Comprehensive brand guidelines
│   └── BRAND_IMPLEMENTATION.md  # Implementation specifics (this file)
├── tailwind.config.ts           # Tailwind configuration with brand colors
├── src/
│   ├── app/
│   │   └── globals.css          # Global styles and brand utilities
│   └── components/
│       ├── ui/                 # UI component library
│       └── AgentConsole.tsx    # Main application component

🎨 Color Implementation

Tailwind Configuration

All brand colors are defined in tailwind.config.ts:

Usage with Inline Classes

Aura follows Tailwind's utility-first philosophy by using inline classes rather than custom utility classes. This approach:

  • Keeps styles explicit and visible in components

  • Enables tree-shaking for unused styles

  • Makes it easier to customize per-component

  • Reduces CSS file size

Primary CTA Button:

Secondary Button:

Card Component:

Input Field:

Error State:

📐 Typography Implementation

Font Families

The Inter font family is used as the primary typeface:

Typography Classes

Semantic typography classes are defined in globals.css for consistent text hierarchy:

Note: These semantic classes use CSS properties directly rather than @apply directives due to Tailwind CSS v4 constraints with custom color references.

Usage Examples

Main Heading:

Section Heading:

Body Text:

Caption:

🎯 Component Styles

Card Component

Use inline Tailwind classes for consistent card styling:

This applies:

  • Background: bg-card-bg (#1a1a1a)

  • Border: border-gray-700 (#373737)

  • Border Radius: rounded-lg (0.5rem / 8px)

  • Shadow: shadow-card (subtle card shadow)

Input Component

Use inline Tailwind classes for consistent input styling:

This applies:

  • Background: bg-gray-800 (#1f1f1f)

  • Border: border-gray-600 (#4b4b4b)

  • Text: text-white

  • Focus: cyberpunk-blue ring with outline removal

Button Components

Use inline Tailwind classes for consistent button styling:

🎭 Animations & Transitions

Transitions

Use inline Tailwind classes for consistent transitions:

Common transition patterns:

Fade-in Animation

Use the animate-fade-in utility class for fade-in effects:

This animation is defined in globals.css using @keyframes:

🌙 Dark Mode Implementation

Aura uses a dark-first approach with Tailwind's dark mode:

📱 Responsive Design

Breakpoints

Use Tailwind's built-in breakpoints:

Container Sizing

🔒 Accessibility

Focus Styles

Global focus styles are defined in globals.css:

This creates a dual-ring focus indicator:

  • Inner ring: dark-bg (#0a0a0a) - 2px offset

  • Outer ring: cyberpunk-blue (#00f2ff) - 4px offset

For component-specific focus states, use inline Tailwind classes:

Semantic HTML

Always use semantic HTML elements:

ARIA Attributes

Use proper ARIA attributes:

📋 Component Checklist

Creating New Components

  1. Color: Use brand colors from Tailwind config (e.g., bg-cyberpunk-blue, text-gray-400)

  2. Typography: Use semantic typography classes (.h1, .h2, .body-text, .caption-text)

  3. Spacing: Use Tailwind's spacing scale (e.g., p-4, space-y-2, gap-4)

  4. Borders: Use border-gray-700 for standard borders

  5. Transitions: Add transition-all duration-200 for interactive elements

  6. Accessibility: Ensure proper focus states and ARIA attributes

  7. Responsive: Test on all breakpoints (use sm:, md:, lg: prefixes)

  8. Dark Mode: Verify dark mode compatibility

Component Review

🔧 Development Workflow

Adding New Colors

  1. Add to tailwind.config.ts

  2. Document in BRAND_GUIDELINES.md

  3. Update BRAND_IMPLEMENTATION.md with usage examples

  4. Test contrast ratios

Adding New Typography

  1. Define in globals.css

  2. Add to typography table in guidelines

  3. Document usage patterns

Creating New Components

  1. Follow existing patterns

  2. Use brand utility classes

  3. Add to component library if reusable

  4. Document component usage

🧪 Testing Brand Consistency

Visual Regression Testing

Use tools like:

  • Storybook for component isolation

  • Chromatic for visual regression testing

  • BrowserStack for cross-browser testing

Automated Checks

📝 Common Patterns

Gradient Backgrounds

Use the bg-cyberpunk-gradient utility for gradient backgrounds:

The gradient is defined in tailwind.config.ts:

Status Badges

Loading States

Interactive Cards

🔗 Integration with Design Tools

Figma to Code

  1. Use Figma's Tailwind plugin

  2. Map Figma styles to Tailwind classes

  3. Export assets with proper naming

  4. Use Figma variables for brand colors

Design Token Management

📋 Maintenance

Updating Brand Guidelines

  1. Update BRAND_GUIDELINES.md

  2. Update BRAND_IMPLEMENTATION.md

  3. Update Tailwind config

  4. Update global CSS

  5. Create migration guide if needed

  6. Update all components

Versioning

Follow semantic versioning for brand changes:

  • Patch: Minor tweaks, bug fixes

  • Minor: New components, non-breaking changes

  • Major: Complete redesign, breaking changes

🤝 Contributing

Reporting Brand Issues

  1. Open GitHub issue

  2. Tag with brand label

  3. Include screenshots

  4. Specify location

  5. Suggest fix if possible

Brand Review Process

  1. Design team review

  2. Engineering team implementation

  3. QA testing

  4. Stakeholder approval

  5. Documentation update


© 2024 Aura Platform. All rights reserved.

Последнее обновление