showcase-card
componentry/showcase-cardFreeComponent
A premium showcase card component with 3D tilt effect, parallax image, micro-interactions, and multiple variants. Perfect for portfolios, agency sites, and product showcases.
Live preview
live · rendered by the registry
Rendered by componentry on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://componentry.dev/r/showcase-card.jsonSource
1"use client"23import * as React from "react"4import { motion, useMotionValue, useSpring, useTransform } from "framer-motion"5import { cn } from "@/lib/utils"67interface ShowcaseCardProps {8 /** Top tagline text */9 tagline?: string10 /** Main heading text */11 heading: string12 /** Description text below heading */13 description?: string14 /** Image URL for the hero section */15 imageUrl: string16 /** Alt text for the image */17 imageAlt?: string18 /** CTA button text */19 ctaText?: string20 /** CTA button click handler */21 onCtaClick?: () => void22 /** Brand name or logo text */23 brandName?: string24 /** Array of service tags */25 services?: string[]26 /** Custom class name */27 className?: string28 /** Enable 3D tilt effect on hover */29 enableTilt?: boolean30 /** Maximum tilt angle in degrees */31 maxTilt?: number32 /** Enable parallax effect on image */33 enableParallax?: boolean34}3536function ShowcaseCard({37 tagline,38 heading,39 description,40 imageUrl,41 imageAlt = "Showcase image",42 ctaText,43 onCtaClick,44 brandName,45 services = [],46 className,47 enableTilt = true,48 maxTilt = 8,49 enableParallax = true,50}: ShowcaseCardProps) {51 const cardRef = React.useRef<HTMLDivElement>(null)52 const [isHovered, setIsHovered] = React.useState(false)5354 // Mouse position for tilt effect55 const mouseX = useMotionValue(0)56 const mouseY = useMotionValue(0)5758 // Smooth spring animation for tilt59 const springConfig = { damping: 25, stiffness: 150 }60 const rotateX = useSpring(useTransform(mouseY, [-0.5, 0.5], [maxTilt, -maxTilt]), springConfig)61 const rotateY = useSpring(useTransform(mouseX, [-0.5, 0.5], [-maxTilt, maxTilt]), springConfig)6263 // Parallax transform for image64 const parallaxX = useSpring(useTransform(mouseX, [-0.5, 0.5], [-15, 15]), springConfig)65 const parallaxY = useSpring(useTransform(mouseY, [-0.5, 0.5], [-15, 15]), springConfig)6667 // Glow effect position68 const glowX = useSpring(useTransform(mouseX, [-0.5, 0.5], [0, 100]), springConfig)69 const glowY = useSpring(useTransform(mouseY, [-0.5, 0.5], [0, 100]), springConfig)7071 const handleMouseMove = React.useCallback(72 (e: React.MouseEvent<HTMLDivElement>) => {73 if (!cardRef.current || !enableTilt) return7475 const rect = cardRef.current.getBoundingClientRect()76 const x = (e.clientX - rect.left) / rect.width - 0.577// … truncated
More from componentry
All 59 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Animated Gradientanimated-gradient | componentry | Components | Free | no deps | |
| ASCII Effectascii-effect | componentry | Components | Free | no deps | |
| Aurora Flowaurora-flow | componentry | Components | Free | no deps | |
| auth-modalauth-modal | componentry | Components | Free | no deps | |
| border-beamborder-beam | componentry | Components | Free | no deps | |
| circuit-boardcircuit-board | componentry | Components | Free | no deps | |
| closing-plasmaclosing-plasma | componentry | Components | Free | no deps | |
| collection-surfercollection-surfer | componentry | Components | Free | no deps |
