Fan Hover Card Stack
ProHover a stacked profile deck and watch the cards fan outward in sequence while the active one lifts to the front.
Overview
Fan Hover Card Stack is a React and Tailwind CSS profile card stack for team pages and testimonials, in Next.js or any React app, animated with Framer Motion. The collapsed deck fans outward on a soft spring when hovered or focused, and the active card lifts to the front without changing its tint or tilt. Arrow keys move the active card through the list, onActiveChange reports it, and spread and lift set the size of the fan. Reduced motion swaps poses almost instantly. defaultActiveIndex decides which card sits in front while the deck is collapsed.
Installation
Run the following command
pnpm dlx wensity@latest add fan-hover-card-stack
Usage
Import FanHoverCardStack from @/components/wensity/fan-hover-card-stack and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.
import {FanHoverCardStack,type FanStackCard,} from "@/components/wensity/fan-hover-card-stack";const items: FanStackCard[] = [{id: "parth",name: "Parth",age: 21,role: "Founder of Wensity",description:"We use this system to ship polished interfaces faster.",image: "https://assets.wensity.com/avatars/1.webp",},{id: "maya",name: "Maya Chen",age: 29,role: "Product lead",description:"The template gave us a credible launch surface in one sprint.",image: "https://assets.wensity.com/avatars/3.webp",},];export default function Example() {return (<FanHoverCardStackitems={items}defaultActiveIndex={1}spread={168}lift={34}/>);}
Props
| Prop | Type | Default | Description |
|---|---|---|---|
items | FanStackCard[] | - | Profile cards rendered in the stack. |
defaultActiveIndex | number | 2 | Card that sits in front when the deck is collapsed. |
spread | number | 168 | Horizontal fan distance in pixels when expanded. |
lift | number | 34 | Vertical lift for the active expanded card in pixels. |
onActiveChange | (item: FanStackCard, index: number) => void | - | Fires when the active card changes. |
Featured in React 3D components and React carousel components.
