Join our Discord Community
Interactive

Apple Cards Carousel

Apple-style scrollable cards carousel with smooth animations and modal overlays. Perfect for React applications requiring elegant content presentation with Next.js integration and TypeScript support.

Loading component...

Installation

npx shadcn@latest add https://www.shadcn.io/registry/apple-cards-carousel.json
npx shadcn@latest add https://www.shadcn.io/registry/apple-cards-carousel.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/apple-cards-carousel.json
bunx shadcn@latest add https://www.shadcn.io/registry/apple-cards-carousel.json

Features

  • Smooth horizontal scrolling with momentum-based navigation and scroll indicators
  • Modal card expansion with full-screen overlay and backdrop blur effects using Framer Motion
  • Responsive design with adaptive card sizing and mobile-optimized touch interactions
  • Layout animations with optional shared element transitions between states
  • Keyboard navigation with Escape key support and focus management
  • TypeScript support with comprehensive type definitions and prop interfaces
  • shadcn/ui integration using consistent design tokens and styling patterns

Examples

Interactive Layout Animations

Loading component...

Demonstrates smooth layout transitions between card states with enhanced animations.

Use Cases

This free open source React component works well for:

  • Portfolio galleries - Showcase projects with expandable detail views built with Next.js
  • Product catalogs - Display items with rich content overlays using TypeScript
  • Blog previews - Feature articles with full-screen reading experience
  • Team showcases - Present team members with detailed profiles and Tailwind CSS styling
  • Case studies - Highlight work samples with comprehensive project details

API Reference

PropTypeDefaultDescription
itemsJSX.Element[]requiredArray of Card components to display in the carousel
initialScrollnumber0Initial scroll position for the carousel

Card

PropTypeDefaultDescription
cardCardrequiredCard data object with src, title, category, and content
indexnumberrequiredCard index for scroll positioning and animations
layoutbooleanfalseEnable layout animations for smooth state transitions

Card Data Object

PropertyTypeDescription
srcstringImage URL for the card background
titlestringMain heading text displayed on the card
categorystringCategory label shown above the title
contentReact.ReactNodeFull content displayed in the modal overlay

BlurImage

PropTypeDefaultDescription
srcstringrequiredImage source URL
altstring"Background of a beautiful view"Alternative text for accessibility
classNamestringundefinedAdditional CSS classes for styling
fillbooleanfalseWhether image should fill its container
widthnumberundefinedImage width in pixels
heightnumberundefinedImage height in pixels

Implementation Notes

  • Component requires @tabler/icons-react and motion libraries for full functionality
  • Cards automatically handle modal state management and scroll positioning
  • Uses useOnClickOutside hook for modal dismissal - ensure hook is available in project
  • Responsive breakpoints adjust card sizes and navigation behavior
  • Modal overlays disable body scrolling and provide keyboard navigation
  • Layout animations require layout={true} prop for optimal performance
  • Compatible with both light and dark themes through CSS custom properties