We use cookies to ensure you get the best experience on our website. Read our privacy policy

Skip to main content

Directory

Card Carousel Component

The Card Carousel component creates an interactive, touch-enabled carousel with navigation controls and position indicators. Perfect for showcasing content in a structured, paginated format with smooth transitions and infinite scroll capability.

    TypeScript

    Strongly typed programming language that builds on JavaScript

    Powerful animation library for creating complex animations

    Cloudflare Pages

    Secure and fast hosting solution with a generous free tier.

    Reliable and scalable database solution.

    Modern static site generator with island architecture for optimal performance

    Utility-first CSS framework for rapid UI development

  • Check Circle

    Navigation Controls: Intuitive prev/next buttons with keyboard support

  • Check Circle

    Position Indicators: Interactive dots showing current slide position

  • Check Circle

    Touch Support: Swipe gestures for mobile devices with smooth transitions

  • Check Circle

    Infinite Scroll: Seamless looping with smooth transitions between sets

  • Check Circle

    Accessibility: Full keyboard navigation and ARIA support

Basic Settings
<CarouselCard>
<div class="flex flex-col bg-bg-card shadow-card w-[250px] min-w-min gap-2 p-6 shrink-0">
<div class="flex flex-row items-center gap-2">
<h3 class="w-full font-bold">Card 1</h3>
</div>
<p class="text-text-secondary w-fit text-sm">Card 1 description</p>
</div>
<!-- Your items -->
</CarouselCard>

    TypeScript

    Strongly typed programming language that builds on JavaScript

    Powerful animation library for creating complex animations

    Cloudflare Pages

    Secure and fast hosting solution with a generous free tier.

    Reliable and scalable database solution.

    Modern static site generator with island architecture for optimal performance

    Utility-first CSS framework for rapid UI development

Advanced Settings
<CarouselCard
infinite
fadeEdges
showDots
class="custom-carousel"
rowProps={{
class: 'items-center gap-4'
}}
>
<!-- Your items -->
</CarouselCard>
Card Carousel Component Extends <div> HTMLElement
Prop Type Default Description
dotListProps HTMLAttributes<"div"> Props for the dot list wrapper
fadeEdges boolean true Enable gradient fade effect on edges
infinite boolean false Enable infinite scroll functionality
navButtonProps ComponentProps<typeof Button> Props for the navigation buttons
rowProps HTMLAttributes<"ul"> Props for the carousel track element
showDots boolean false Show position indicator dots
showNavigation boolean true Show navigation buttons

The infinite scroll feature provides a seamless, endless browsing experience:

  • Check Circle

    Automatically clones items to create smooth transitions

  • Check Circle

    Maintains consistent navigation and dot indicators

  • Check Circle

    Seamlessly jumps between item sets without visual interruption

  • Check Circle

    Preserves correct item order and positioning

<CarouselCard infinite>
<!-- Your items -->
</CarouselCard>

The carousel provides multiple ways to navigate:

  1. Button Controls

    • Previous/Next buttons for manual navigation
    • Automatically handles infinite scroll transitions
    • Visible hover states and accessibility support
  2. Dot Indicators

    • Interactive dots showing current position
    • Click to jump to specific slides
    • Keyboard navigation support (Left/Right arrows)
    • Maintains correct position with infinite scroll
  3. Touch Navigation

    • Swipe gestures for mobile devices
    • Smooth transitions between slides
    • Minimum swipe threshold for intentional navigation

The component implements several accessibility enhancements:

  • Check Circle

    ARIA roles and labels for interactive elements

  • Check Circle

    Keyboard navigation support throughout

  • Check Circle

    Focus management for dot indicators

  • Check Circle

    Screen reader friendly navigation

  • Check Circle

    Proper tab order and focus states

  1. Content Guidelines

    • Use consistent card dimensions
    • Keep content concise and scannable
    • Maintain adequate spacing between cards
  2. Responsive Design

    • Test navigation on all devices
    • Adjust card sizes for different screens
    • Ensure touch targets are accessible
Product galleries
Team members
Feature showcases
Testimonials
Portfolio items

Limited Time Launch Sale

Add engaging, interactive card carousels to your website today with our AstroJS starter template. Get started now!

GET 60% OFF!
North Star Themes Logo

Subscribe to our newsletter

Get the latest AstroJS tips and tricks right to your inbox

Email: [email protected]

© 2025 North Star Themes

Web Kit Provided By North Star Themes