united-tattoo/components/united/gallery-card.tsx
Nicholai 3e739877b4 feat(components): add new UI components for enhanced user experience
- Introduced multiple new components including AnimatedLink, Button, Calendar, Card, ColorSwatch, Divider, Filmstrip, FormContainer, FormField, GalleryCard, Heading, HeroOverlay, IdentitySection, ImmersionSection, NewArtistsSection, NewContactSection, NewHero, NewNavigation, Reveal, SectionLabel, StickySplit, and Toast.
- Each component is designed with responsive layouts and customizable styles to improve the overall UI consistency and interactivity.
- Implemented accessibility features and animations to enhance user engagement.

This commit significantly expands the component library, providing a robust foundation for building a cohesive user interface.
2025-11-25 03:00:50 -07:00

38 lines
1.2 KiB
TypeScript

import * as React from "react"
import { cn } from "@/lib/utils"
export interface GalleryCardProps extends React.HTMLAttributes<HTMLElement> {
src: string
alt: string
label: string
aspectRatio?: string
}
const GalleryCard = React.forwardRef<HTMLElement, GalleryCardProps>(
({ className, src, alt, label, aspectRatio = "3/4", ...props }, ref) => {
return (
<figure ref={ref} className={cn("m-0 group", className)} {...props}>
<div
className={cn(
"rounded-[28px] overflow-hidden mb-4",
"shadow-[var(--shadow-lg)]",
"transition-all duration-300 ease-out",
"group-hover:-translate-y-1.5 group-hover:shadow-[var(--shadow-bloom)]",
)}
style={{ aspectRatio }}
>
<img
src={src || "/placeholder.svg"}
alt={alt}
className="w-full h-full object-cover transition-transform duration-300 ease-out group-hover:scale-[1.03]"
/>
</div>
<figcaption className="text-[0.7rem] uppercase tracking-[0.25em] opacity-80">{label}</figcaption>
</figure>
)
},
)
GalleryCard.displayName = "GalleryCard"
export { GalleryCard }