Skip to main content

Overview

The Carousel plugin allows you to create interactive carousels to display images or content in a slider format. It’s perfect for showcasing multiple items in a compact, scrollable interface.

Installation

Basic Usage

Pass the plugin to createYooptaEditor; do not pass plugins to <YooptaEditor>.

Features

  • Multiple Items: Display multiple carousel items
  • Keyboard Shortcuts: Type carousel to insert
  • Responsive: Adapts to different screen sizes
  • Customizable: Extend with custom rendering

Structure

The Carousel plugin consists of nested elements:

Commands

buildCarouselElements

Creates the initial carousel structure.
number
Number of carousel items to create (default: 5)

Extending the Plugin

Custom Rendering

For advanced carousel functionality, you can integrate with Embla Carousel:

Options

object
string[]
default:"['carousel']"
Keyboard shortcuts to trigger the plugin

Use Cases

Image Gallery

Display multiple images in a scrollable carousel

Product Showcase

Show product features or variations

Testimonials

Rotate through customer testimonials

Portfolio

Showcase portfolio items or projects

Best Practices

Ensure images are optimized for web to maintain carousel performance
Keep carousel items reasonable (5-10) for better UX
Provide clear navigation controls for users