Skip to content
Corex

CarouselRenderer

Corex\Ui\Blocks\CarouselRenderer · class · Add-ons layer

Renders the corex/carousel block (spec 068, US9 / FR-154, FR-162) — the one slider primitive the design asks for: a CSS scroll-snap row that is swipeable and keyboard-scrollable with NO JavaScript, progressively enhanced by its viewScript with prev/next/dot buttons and opt-in autoplay. Autoplay is off by default and, when enabled, pauses on hover/focus/blur and is disabled under reduced motion. Configurable slides-per-view (1–6) powers the 1-up testimonial, 2-up project, 4-up product, and 6-up logo layouts from one engine. Token-only, logical properties (RTL-correct), escaped, i18n. Every slide is present in the DOM as a scrollable row, so nothing is lost before hydration or if JS fails. An empty slide set renders nothing.

render(array $attributes, string $content, object $block): string

Section titled “render(array $attributes, string $content, object $block): string”