Beskrivelse
A responsive modern carousel slider for the Gutenberg block editor that lets you add any blocks to your slides. Easily create sliders for hero sections, testimonials, products, and anything else using Gutenberg blocks.
🚀 Carousel Slider Version 2 is built on the modern Swiper.js library for improved performance and better mobile compatibility.
Plugin site: carouselblock.com
Funktioner
- Add unlimited slides
- Tilføj enhver blok til slidene
- Forhåndsvis karrusellen i editoren
- Responsiv og berørings aktiveret
- Developer friendly: supports CSS variables & theme.json
- Accessibility-ready with keyboard navigation and ARIA labels
Indstillinger
- Slide pr. visning
- Slide skiftes ad gangen
- Hastighed af slide skift
- Slide indre margin
- Forrige/næste pile
- Navigation med prikker
- Uendelig sløjfe af slidene
- Automatisk afspilning
- Pause on hover
- Disable on interaction
- Responsive indstillinger: antal slide, der skal vises ved en given skærmstørrelse
- HMV <-
Advanced Settings
For dynamic layouts where the slider or its surrounding layout changes after load, such as tabs, accordions, or lazy-loaded content.
- ResizeObserver
- Observer
- Observe parent elements
- Observe slide children
Plugin Settings
Plugin settings are available from Settings > Carousel Slider in the WordPress admin.
Available options include showing legacy carousel blocks, hiding the legacy warning notice, and loading the full Swiper bundle instead of the default custom Swiper build.
Included Patterns
- Full Width Hero Slider
- Testimonials Slider
- Logos Carousel
The final look of these sliders depends on your theme styles. You can also fine-tune the design using custom CSS variables (see below).
Systemkrav
PHP 5.6+ anbefales, WordPress 5.8+, med Gutenberg aktiv.
Dokumentation
Full documentation: carouselblock.com/docs
Vælg blokken Slide-karrusel fra kategorien Design. Klik på + knappen for enden af karrusellen for at tilføje slide. Tilføj en vilkårlig blok i sliden. Brug den vandrette rullebjælke til at få vist slidene i editoren.
Du kan ændre rækkefølgen af slidene ved at bruge pileknapperne til venstre og højre i værktøjslinjen.
For at fjerne en slide, skal du vælge sliden og klikke på de tre prikker (kebab) lige over det. Klik på indstillingen Fjern Slide for at fjerne det pågældende slide.
Klik på karruselblokken (blokken, der indlejrer alle slide) for at vise karruselindstillingerne.
Upgrading from Legacy Carousel
See the support topic for upgrading legacy blocks to Carousel Slider Version 2.
Carousel Slider settings are available from Settings > Carousel Slider in the WordPress admin.
Customizing Styles
Carousel Slider v2 supports custom styling via CSS variables:
Styling documentation: carouselblock.com/docs?doc=styling
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"
}
}
}
}
Frontend API
Carousel Slider exposes a small frontend API for integrations with tabs, accordions, modals, or other hidden UI.
For some of these dynamic layout cases, the Advanced Settings observer options can also handle updates automatically.
window.CarouselSliderBlock.init( container ): Initializes carousel instances inside the given container.window.CarouselSliderBlock.update( container ): Updates existing carousel instances inside the given container and initializes any that are not yet initialized.





