A responsive modern carousel slider for the Gutenberg block editor that lets you add any blocks to your slides.
🚀 Carousel Slider Version 2 is here! Now powered by Swiper.js for a smoother, faster, and more modern experience. See below for update instructions.
Características
- Añade diapositivas ilimitadas
- Añadie cualquier bloque a las diapositivas
- Vista previa del carrusel en el editor
- Adaptable y compatible con toques
Ajustes
- Diapositivas por vista
- Diapositivas que hacen scroll al mismo tiempo
- Velocidad de desplazamiento
- Relleno de diapositivas
- Flechas de anterior/siguiente
- Navegación por puntos
- Blucle de diapositivas infinito
- Reproducción automática
- Ajustes de adaptabilidad: diapositivas a mostrar y hacer scroll en un tamaño de pantalla dado
- RTL
Requisitos
Recomendamos PHP 5.6+, WordPress 5.8+, con Gutenberg activo.
Documentación
Selecciona el bloque de carrusel de diapositivas desde la categoría de diseño. Haz clic en el botón + situado al final del carrusel para añadir diapositivas. Añade cualquier bloque dentro de las diapositivas. Usa la barra de desplazamiento horizontal para previsualizar las diapositivas en el editor.
Puedes reordenar las diapositivas usando los botones de flecha izquierda y derecha de la barra de herramientas.
Para quitar una diapositiva selecciona la diapositiva y haz clic en los tres puntos de la derecha sobre la misma. Haz clic en la opción de eliminar esa diapositiva.
Haz clic en el bloque de carrusel (el bloque que anida todas las diapositivas) para mostrar los ajustes del carrusel.
Carousel Slider Version 2
Carousel Slider v2 now uses Swiper.js instead of Slick. It’s more modern, better supported, and works smoother across devices.
Upgrading from Legacy Carousel
- Existing legacy (v1) Carousel Slider blocks will still work. You can re-enable them in the admin settings under Settings → Carousel Slider.
- To upgrade, click on a legacy Carousel Slider block in the editor. In the block’s toolbar (the floating bar that appears above the block), click the block icon (first button on the left). From the dropdown, choose «Transform to Carousel Slider v2». Your existing carousel settings will be preserved, but note that the design and HTML markup will change.
- Legacy styles will not apply to v2. You may need to adjust custom CSS.
Optional: Re-enable Legacy Blocks
You can show/hide legacy blocks from the block inserter and disable v2 upgrade notices via Settings → Carousel Slider in the admin menu.
Note: Legacy blocks will continue to function, but are no longer supported. It is highly recommended to upgrade to v2 for continued improvements and compatibility.
Customizing v2 Styles
Carousel Slider v2 supports custom styling via CSS variables:
Navigation
--wp--custom--carousel-block--navigation-size: Arrow icon size--wp--custom--carousel-block--navigation-sides-offset: Distance from edge--wp--custom--carousel-block--navigation-color: Arrow color--wp--custom--carousel-block--navigation-hover-color: Arrow hover color (falls back tonavigation-color)--wp--custom--carousel-block--navigation-alignfull-color: Arrow color when carousel is full width
Pagination (dots)
--wp--custom--carousel-block--pagination-top: Top offset--wp--custom--carousel-block--pagination-bottom: Bottom offset--wp--custom--carousel-block--pagination-bullet-size: Bullet size--wp--custom--carousel-block--pagination-bullet-active-color: Active bullet color--wp--custom--carousel-block--pagination-bullet-inactive-color: Inactive bullet color--wp--custom--carousel-block--pagination-bullet-inactive-hover-color: Inactive bullet hover color (falls back toactive-colorif set)--wp--custom--carousel-block--pagination-bullet-active-opacity: Active bullet opacity--wp--custom--carousel-block--pagination-bullet-inactive-opacity: Inactive bullet opacity--wp--custom--carousel-block--pagination-bullet-inactive-hover-opacity: Inactive bullet opacity on hover (falls back toinactive-opacityif not set)--wp--custom--carousel-block--pagination-bullet-horizontal-gap: Space between bullets (horizontal)--wp--custom--carousel-block--pagination-bullet-vertical-gap: Space between bullets (vertical)
Block Spacing
--wp--custom--carousel-block--image-margin-top: Top margin for image blocks--wp--custom--carousel-block--image-margin-bottom: Bottom margin for image blocks--wp--custom--carousel-block--cover-margin-top: Top margin for cover blocks--wp--custom--carousel-block--cover-margin-bottom: Bottom margin for cover blocks
Theme JSON Support
All the CSS variables can also be defined directly inside your theme’s theme.json under the settings.custom key.
For example:
{
"settings": {
"custom": {
"carousel-block": {
"navigation-size": "22px",
"navigation-color": "#000",
"pagination-bullet-active-color": "#000"
}
}
}
}
