by Groundworx on WordPress.org
A powerful and responsive carousel block built with Splide.js and fully integrated into the WordPress block editor. Create stunning carousels with any …

Carousel block in the WordPress block editor with responsive controls
Groundworx Carousel is a flexible Gutenberg block that transforms any WordPress content into beautiful, responsive carousels. Built on the lightweight Splide.js library, it offers advanced responsive controls, multiple design templates, and extensive customization options—all within WordPress’s native block editor.
🎨 Nine Professional Templates
Choose from carefully designed templates to match your content style:
* Default & Default Alt – Classic carousel layouts with external navigation
* Simple, Simple Left, Simple Right – Clean minimalist designs with flexible content positioning
* Overlay & Overlay Alt – Modern content overlaid on images with gradient backgrounds
* Partial Overlay & Partial Overlay Alt – Balanced layouts with partial content overlays
📱 Advanced Responsive Controls
* Configure carousel behavior per breakpoint (mobile, phone, large-phone, tablet, large-tablet, laptop, desktop, large-desktop)
* Responsive grid fallback – destroy carousel at specific breakpoints to display slides as a grid
* Mobile-first breakpoint system with inheritance
* Full touch and swipe gesture support for mobile devices
* 8 total breakpoint levels for precise responsive control
🎯 Carousel Types & Transitions
* Slide mode – Classic horizontal sliding carousel
* Loop mode – Infinite continuous scrolling with clones
* Fade transitions – Smooth crossfade effects between slides
* Customizable animation speed and easing
* Rewind option for non-loop carousels
⚙️ Flexible Display Options
* Multiple slides per page with responsive settings
* Variable slide width (auto) or fixed width options
* Center mode with focus control
* Customizable gap spacing between slides
* Autoplay with interval and pause-on-hover
* Auto-height adjustment option
🎚️ Navigation & UI Controls
* 11 Arrow Styles: arrow, chevron, chevronRounded, halfArrow, play, playRounded, sharpChevron, thinChevron, thinChevronRounded, triangle, triangleRounded
* 9 Pagination Styles: circle, circleOutline, square, squareOutline, diamond, diamondOutline, rectangle, rectangleOutline, number
* Progress bar indicator
* Slide counter display (e.g., “3 / 10”)
* Hide/show controls per breakpoint
* Color customization for all UI elements
🎨 Advanced Color Controls
Customize every UI element with independent color pickers:
* Arrows: text, background, border colors
* Active Pagination: text, background, border colors
* Inactive Pagination: text, background, border colors
* Progress Bar: foreground and background colors
* Counter: text color
♿ Accessibility First
* ARIA labels and semantic HTML structure
* Keyboard navigation support (arrow keys, Enter, Space)
* Screen reader friendly with live regions
* WCAG compliant markup
* Focus management and visible focus states
🔧 Developer Features
* Block variations support via wp.blocks.registerBlockVariation()
* Custom Splide.js options via attributes
* Extensible template system with WordPress hooks
* Breakpoint configuration via JSON file
* React hooks for responsive state management
* CSS custom properties for styling integration
* Well-documented, modular code structure
The Carousel block is a container that accepts any WordPress block as slides:
* Core Image block
* Core Paragraph block
* Core Heading block
* Core Group block
* Core Cover block
* Core Buttons block
* Custom blocks from other plugins
* Your own custom blocks
Each slide is fully customizable using WordPress’s native block editing tools.
Powered by Splide.js 4.x – a lightweight (28KB gzipped), accessible, and performant carousel library. No jQuery required. Optimized for modern browsers with progressive enhancement.
This carousel block is part of the Groundworx Block Suite—a modular collection of high-performance, design-focused blocks built for modern WordPress development. Uses Groundworx Foundation components for consistent, professional UI controls.
You can register custom carousel variations using wp.blocks.registerBlockVariation() and pass Splide configuration options via the splideOptions attribute.
Example: Carousel with Grid Fallback at Tablet
wp.blocks.registerBlockVariation('groundworx/carousel', {
name: 'carousel-to-tablet',
title: 'Carousel / Grid Tablet',
attributes: {
template: 'default',
splideOptions: {
type: 'loop',
perPage: 1,
arrows: true,
pagination: true
},
breakpoints: {
tablet: {
layout: {
type: 'grid',
columnCount: 3
}
}
}
},
scope: ['block', 'inserter', 'transform']
});
Example: Auto-Width Carousel
wp.blocks.registerBlockVariation('groundworx/carousel', {
name: 'auto-width-carousel',
title: 'Auto Width Carousel',
attributes: {
splideOptions: {
type: 'loop',
fixedWidth: '300px',
focus: 'center',
gap: '1rem'
}
}
});
Use the groundworx.carousel.templates filter to add custom templates:
wp.hooks.addFilter(
'groundworx.carousel.templates',
'my-theme/add-custom-template',
(templates) => [
...templates,
{
label: 'My Custom Template',
value: 'my-custom'
}
]
);
Then add your template styles in your theme:
.template-my-custom .splide__slide {
/* Your custom styles */
}
The carousel supports 7 configurable responsive breakpoints plus a mobile/default base, following a mobile-first approach:
Settings cascade from mobile to larger screens. Override at any breakpoint to change behavior.
Grid Fallback Breakpoints:
For grid fallback functionality, you can use any of the 7 breakpoints: phone, large-phone, tablet, large-tablet, laptop, desktop, or large-desktop.
All Splide.js options are supported via the splideOptions attribute. Common options:
type: ‘slide’, ‘loop’, or ‘fade’perPage: Number of slides per pagefixedWidth: Fixed width for each slide (e.g., ‘300px’)gap: Space between slidesautoplay: Enable/disable autoplayinterval: Autoplay interval in millisecondsspeed: Transition speed in millisecondsrewind: Enable rewind for non-loop carouselsarrows: Show/hide arrowspagination: Show/hide paginationfocus: ‘center’ for center modeautoHeight: Adjust height to current slideFull documentation: https://splidejs.com/guides/options/
/* Arrow Colors */
--gwx--color--arrows
--gwx--background-color--arrows
--gwx--border-color--arrows
/* Active Pagination Colors */
--gwx--color--pagination
--gwx--background-color--pagination
--gwx--border-color--pagination
/* Inactive Pagination Colors */
--gwx--color--inactive-pagination
--gwx--background-color--inactive-pagination
--gwx--border-color--inactive-pagination
/* Progress Bar Colors */
--gwx--color--progress
--gwx--background-color--progress
/* Counter Color */
--gwx--color--counter
Each template adds a class to the carousel wrapper:
.template-default.template-default-alt.template-simple.template-simple-left.template-simple-right.template-overlay.template-overlay-alt.template-partial-overlay.template-partial-overlay-altUse these for template-specific styling.
This plugin does not collect, store, or transmit any user data. It operates entirely within your WordPress installation and does not make external API calls except for loading assets from your own server.