Files
pastel-ui/components/ui/button.tsx
valknarness 41d463873e feat: add comprehensive visual improvements and polished UI
Major visual enhancements for professional look and feel:

**New Components:**
- Skeleton component for loading states
  - Pulse animation
  - Reusable for any content type
  - Consistent styling

**Enhanced Animations:**
- Added 8 new custom animations:
  - fade-in (smoother 0.3s)
  - slide-up/down (enhanced 0.4s)
  - slide-in-right/left (directional)
  - scale-in (zoom effect)
  - bounce-gentle (subtle bounce)
  - shimmer (loading effect)

**Global Visual Improvements:**
- Smooth theme transitions (200ms cubic-bezier)
- Custom scrollbar styling with hover states
- Smooth scroll behavior enabled
- Theme transitioning class to prevent flash
- Better transition timing functions

**Component Enhancements:**

1. Home Page:
   - Staggered fade-in animations (0s, 0.1s, 0.2s-0.4s delays)
   - Scale animations on feature cards
   - Hover effects with shadow and border color change
   - Responsive padding adjustments
   - Enhanced button hover (scale + shadow)

2. ColorSwatch:
   - Improved hover scale (105% → 110%)
   - Added shadow on hover
   - Backdrop blur on overlay
   - Active state scale down (95%)
   - Smoother transitions (200ms)
   - Scale-in animation for copy icon

3. Button Component:
   - Active state scale down effect
   - Shadow on hover for primary/destructive
   - Border color change on outline hover
   - Smoother transitions (200ms)
   - Focus ring offset for better visibility

**Micro-interactions:**
- All buttons have active:scale-95
- Cards lift on hover with shadows
- Smooth color transitions on theme switch
- Icons animate on appearance
- Links scale up on hover

**Visual Consistency:**
- Consistent timing (200ms for interactions)
- Unified hover patterns across components
- Standardized shadow depths
- Better focus indicators
- Smooth scroll throughout

**Performance:**
- No janky transitions
- Optimized animations (transform + opacity)
- Hardware-accelerated properties
- Minimal repaints

The UI now feels polished, professional, and delightful to use!

Build successful - all visual enhancements working.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 12:04:46 +01:00

44 lines
1.6 KiB
TypeScript

import * as React from 'react';
import { cn } from '@/lib/utils/cn';
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
variant?: 'default' | 'outline' | 'ghost' | 'destructive';
size?: 'default' | 'sm' | 'lg' | 'icon';
}
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant = 'default', size = 'default', ...props }, ref) => {
return (
<button
className={cn(
'inline-flex items-center justify-center rounded-md font-medium',
'transition-all duration-200',
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
'disabled:pointer-events-none disabled:opacity-50',
'active:scale-95',
{
'bg-primary text-primary-foreground hover:bg-primary/90 hover:shadow-md':
variant === 'default',
'border border-input bg-background hover:bg-accent hover:text-accent-foreground hover:border-primary':
variant === 'outline',
'hover:bg-accent hover:text-accent-foreground': variant === 'ghost',
'bg-destructive text-destructive-foreground hover:bg-destructive/90 hover:shadow-md':
variant === 'destructive',
'h-10 px-4 py-2': size === 'default',
'h-9 px-3': size === 'sm',
'h-11 px-8': size === 'lg',
'h-10 w-10': size === 'icon',
},
className
)}
ref={ref}
{...props}
/>
);
}
);
Button.displayName = 'Button';
export { Button };