Skip to content

[MEDIUM PRIORITY] Button Style Inconsistency Across Pages #138

@pbrissaud

Description

@pbrissaud

Button Style Inconsistency Across Pages

Problem Description

Primary CTA buttons have different styles on different pages, with varying:

  • Button padding and sizing
  • Hover states and transitions
  • Shadow application
  • Border consistency

Impact

  • Inconsistent user experience across pages
  • Weakens brand professionalism
  • Confusing interaction patterns
  • Degrades perceived quality

Current State by Page

Page Button Style Shadow Border Consistency
Homepage Varied Mixed 3px/4px
/get-started Purple CTA 3px
/challenges Mixed Some Varied
/dashboard Consistent 3px
/profile "Save Changes" 3px

Affected Files

  • components/ui/button.tsx - Base button component (uses Tailwind shadow)
  • Various page components overriding button styles

Current Button Component Analysis

File: components/ui/button.tsx:7-36

Issues Found:

  1. Uses Tailwind's default shadow-xs (soft shadow) ❌
  2. Border not explicitly defined (relies on Tailwind defaults)
  3. Missing explicit neo-brutalism hard shadow

Suggested Fix

1. Update Button Component to Use Neo-Brutalism:

// components/ui/button.tsx
const buttonVariants = cva(
  "inline-flex items-center justify-center gap-2 whitespace-nowrap " +
  "rounded-lg text-sm font-medium transition-all " +  // Use rounded-lg for 8px
  "neo-border neo-shadow " +                          // Add neo-brutalism classes
  "hover:translate-x-[2px] hover:translate-y-[2px] " + // Hover effect
  "hover:neo-shadow-sm " +                            // Reduce shadow on hover
  "disabled:pointer-events-none disabled:opacity-50",
  {
    variants: {
      variant: {
        default: "bg-primary text-primary-foreground hover:bg-primary/90",
        // ... other variants
      },
      size: {
        default: "h-10 px-6 py-2",  // Consistent sizing
        sm: "h-9 px-4 py-1.5",
        lg: "h-12 px-8 py-3",
        // ...
      }
    }
  }
);

2. Standardize Hover Behavior:

/* Add to app/globals.css if not using classes above */
.btn-neo-hover:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px 0px oklch(0.15 0 0);
}

3. Remove Inline Style Overrides:
Search for buttons with inline styles or className overrides:

rg "Button.*className=" --type tsx

Definition of Done

✅ All buttons use standardized button component
✅ Consistent neo-brutalism shadow (neo-shadow)
✅ Consistent border (3px solid black via neo-border)
✅ Uniform hover effect (translate + shadow reduction)
✅ No inline style overrides on buttons
✅ Same button appearance across all pages
✅ Proper size variants (sm, default, lg) used appropriately

Priority

MEDIUM PRIORITY - Phase 3 component standardization

References

  • Style Audit Report: Lines 373-409
  • Current Button: components/ui/button.tsx
  • Neo-Brutalism Utilities: app/globals.css:128-151

Metadata

Metadata

Assignees

No one assigned

    Labels

    design-systemDesign system consistency and neo-brutalism style issuesux

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions