# RFC-0027: Carousel - Status: Accepted (2026-10-17; the directions were decided in the companion research) - Author: Halil (Madraka), drafted with Claude · Date: 2026-10-17 - Related: - RFC-0020 (surfaces), RFC-0024 (motion levels, the page-wide pause), RFC-0025 (overlays, `Lightbox`), RFC-0026 (icons), RFC-0028 (image fit, planned); - `docs/design/carousels.md`, the research: platform status, the APG pattern, the evidence on auto-rotating heroes, libraries compared and the decisions taken here (sources there). ## Summary A `Carousel` catalog component: its children are slides, in four variants (`hero`, `rail`, `gallery`, `testimonials`). It works without JavaScript (a scroll-snap track, markers as real links) and a small first-party module adds buttons, position, announcements and, for heroes only and off by default, guarded autoplay. The store enforces the evidence: few hero slides, no autoplay by default, no carousel inside a carousel. ## Motivation - Heroes, product and logo rails, testimonials and galleries are among the most requested landing-page parts; agents have only `Marquee` (a moving strip, not navigable) and `Lightbox`. - Carousels are easy to get wrong: auto-rotation nobody can stop, slides hidden from keyboard users, layout shift, a lazy first image. Making them data the store checks lets every site get them right. ## Proposal ### 1. The component ```jsonc { "component": "Carousel", "props": { "label": "Featured stories", // required; never the word "carousel" "variant": "hero" | "rail" | "gallery" | "testimonials", "perView": 1 | 2 | 3 | 4, // rail; absent = as many as fit (itemWidth) "itemWidth": "s" | "m" | "l", "peek": "none" | "s" | "m", // a part of the next slide shows "align": "start" | "center", "gap": "none" | "s" | "m" | "l" | "xl", "aspect": "16:9" | "21:9" | "4:3" | "1:1" | "3:4", // required for hero and gallery "controls": "both" | "arrows" | "markers" | "none", "markers": "numbers" | "dots" | "labels" | "thumbs", "loop": true, // hero only (27d) "autoplay": "off" | "slow" | "normal" // hero only, off by default (27d) }, "children": ["slide-1", "slide-2", "…"] } ``` ### 2. Markup (no JavaScript needed) - `
` around a focusable scroll-snap track; each slide a `group` with `aria-roledescription="slide"` and a name ("2 of 5"). - Markers are `