Carousel

From thedaviddias/ux-patterns-for-developers · View interactive version

Carousel is an AI agent skill from the GitHub repository thedaviddias/ux-patterns-for-developers. Use when you need to display multiple items in a rotating view.

How to use this skill

Skill file

Carousel

Display multiple items in a rotating view

What it solves

A carousel displays content or images in a rotating or sliding manner. Users navigate through content with arrows, dots, or swipe gestures on touch devices.

Carousels showcase featured content, promotions, or image galleries in limited space.

When to use

Use carousels to display related content or images in limited space while keeping users engaged.

Common use cases include:

When to avoid

Implementation workflow

  1. Confirm the pattern matches the problem and constraints before copying the example.
  2. Start from the anatomy and examples in references/pattern.md, then choose the smallest viable variation.
  3. Apply accessibility, performance, and interaction guardrails before layering visual polish.
  4. Use the testing guidance to verify behavior across keyboard, screen reader, responsive, and failure scenarios.

Accessibility guardrails

When to use a tabbed carousel vs grouped carousel?

Use a Tabbed Carousel When:

Example Use Cases for Tabbed Carousels:

Performance guardrails

Target performance metrics for carousels:

Common mistakes

Auto-Play Without Controls

The Problem: Users might not have enough time to read or interact with content, and constantly rotating slides can disorient or frustrate them—especially those using assistive technologies.

How to Fix It? Always provide pause/play controls. Respect prefers-reduced-motion by disabling or slowing auto-rotation for users who prefer less animation.

No Keyboard or Touch Support

The Problem: Carousels often exclude users who rely on keyboard navigation or expect swipe gestures on mobile devices.

How to Fix It? Ensure you can navigate slides via Tab and arrow keys. Add swipe or drag support for mobile. Test thoroughly across various devices and accessibility tools.

Hiding Important Content in Later Slides

The Problem: Many users never click past the first slide, missing crucial information if it’s hidden further down the carousel.

How to Fix It? Place the most essential content in the first slide. If the content is critical, consider using a static layout or highlight it differently so users don’t need to scroll or click.

Related patterns


For full implementation detail, examples, and testing notes, see references/pattern.md.

Pattern page: https://uxpatterns.dev/patterns/content-management/carousel

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.