fanned-cards
Skill0 starsChanged 4 months agoMITView on GitHub
Fanned card carousel component for React/Next.js. One active card centred with cyan border glow, adjacent cards peek from behind (dimmed, scaled). Swipe/click/arrow navigation. Uses Framer Motion springs. Works on mobile and desktop.
In this repository37 other files it gives its agents.
- .agents/skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- vercel-composition-patterns/AGENTS.mdAGENTS.md
- senior-frontendSkill
- vercel-composition-patternsSkill
- bento-designSkill
- flip-cardSkill
- floating-quotesSkill
- githubSkill
- glassmorphism-uiSkill
- gmail-proxySkill
- googleSkill
- hippocampusSkill
- html-pdf-exportSkill
- iframe-previewSkill
- infinite-canvasSkill
- matrix-textSkill
- nextjs-apiSkill
- nextjs-expertSkill
- pinterestSkill
- railway-deploySkill
- remotion-videoSkill
- scramble-textSkill
- scroll-video-heroSkill
- senior-frontendSkill
- SEOSkill
- ship-websiteSkill
- sound-engineSkill
- stripe-best-practicesSkill
- tilt-cardSkill
- tube-summarySkill
- upload-postSkill
- vercel-composition-patternsSkill
- vercel-deploySkill
- vercel-react-best-practicesSkill
- vertical-fanned-cardsSkill
- video-contentSkill
- war-roomSkill
The file
Files
Fanned Cards Carousel
A premium card carousel where the active card is centred and prominent, with adjacent cards visible behind it like a hand of playing cards. Built with React + Framer Motion.
When to Use
- Roadmap/timeline phases
- Feature showcases
- Pricing tiers
- Portfolio pieces
- Any content with 3-7 cards that benefit from focused browsing
Architecture
- Active card: Full brightness, cyan border glow (
border-[#5CE5D5]/60),scale(1), highest z-index - Adjacent cards: Dimmed (
brightness(0.45)),scale(0.92), peek from behind with configurable overlap - Navigation: Arrow buttons (left/right), phase dots/badges, swipe (pointer events), click any card
- Animation: Framer Motion spring (
stiffness: 300, damping: 30) for satisfying snap
Key Parameters
| Parameter | Default | Description |
cardWidth | 420px | Width of each card |
overlap | 60px | How much cards overlap (smaller = more overlap) |
inactiveScale | 0.92 | Scale of non-active cards |
inactiveBrightness | 0.45 | Brightness filter for non-active cards |
swipeThreshold | 40px | Minimum drag distance to trigger navigation |
Implementation
See references/fanned-cards.tsx for the complete component.
Quick Integration
- Copy the component from references
- Replace the
itemsarray with your data - Replace
ItemCardwith your card component - Pass
isActiveprop to your card for border glow styling
Card Styling
Active card should have:
className={`... ${isActive ? 'border-2 border-[#5CE5D5]/60 shadow-[0_0_40px_rgba(92,229,213,0.12)]' : 'border border-white/5'}`}Mobile Considerations
- Arrow buttons positioned
left-2/right-2on mobile,left-4/right-4on desktop - Cards automatically overlap more on smaller screens due to overflow hidden
- Swipe works via pointer events (no external library needed)
Dependencies
framer-motion(motion, spring animations)react(useState, useRef, useCallback)- Tailwind CSS v4 (utility classes)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

