# JavaScript carousel libraries

JavaScript carousel libraries show a row of slides that people swipe, drag, or click through one at a time. A carousel tracks the active slide and moves the track when that slide changes. These libraries build the image galleries, product sliders, and testimonial rotators on marketing sites and storefronts.

## Popularity

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [embla-carousel](#embla-carousel) | 119.0M | 8.5K | Apr 2025 | MIT |
| [Bootstrap](#bootstrap) | 30.4M | 175.1K | Nov 2026 | MIT |
| [Swiper](#swiper) | 21.1M | 41.9K | Oct 2026 | MIT |
| [react-slick](#react-slick) | 7.3M | 11.9K | Aug 2025 | MIT |
| [react-bootstrap](#react-bootstrap) | 6.6M | 22.6K | May 2025 | MIT |
| [@zag-js/carousel](#zag-js-carousel) | 6.5M | 5.3K | Nov 2026 | MIT |
| [slick-carousel](#slick-carousel) | 5.7M | 28.5K | Sep 2026 | MIT |
| [React Responsive Carousel](#react-responsive-carousel) | 4.6M | 2.7K | Mar 2022 | MIT |

Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[Embla Carousel](#embla-carousel) has the most monthly downloads in this comparison, at 119.0M.

## Capabilities

| Library | React required | jQuery required | Autoplay |
| --- | --- | --- | --- |
| [embla-carousel](#embla-carousel) | No | No | Via plugin |
| [Bootstrap](#bootstrap) | No | No | Yes |
| [Swiper](#swiper) | No | No | Yes |
| [react-slick](#react-slick) | Yes | No | Yes |
| [react-bootstrap](#react-bootstrap) | Yes | No | Yes |
| [@zag-js/carousel](#zag-js-carousel) | No | No | Yes |
| [slick-carousel](#slick-carousel) | No | Yes | Yes |
| [React Responsive Carousel](#react-responsive-carousel) | Yes | No | Yes |

## Libraries

### embla-carousel

[GitHub](https://github.com/davidjerleke/embla-carousel) · [npm](https://www.npmjs.com/package/embla-carousel) · [Docs](https://www.embla-carousel.com)

Provides a carousel API for scrolling, focus handling, and responsive layout updates.

- Downloads / mo: 119.0M
- Stars: 8.5K
- Last release: 8.6.0
- License: MIT
- Capabilities: [From the embla-carousel docs](https://www.embla-carousel.com)

**Strengths**

- **Scrolls focused slides into view.** Focus events trigger scrolling to the focused element.
- **Updates when slide sizes change.** Size changes automatically trigger carousel reinitialization.

**Watch out for**

- **Short content disables looping.** Embla turns loop off when slide content cannot form a loop without visible glitches.
- **RTL needs matching content direction.** Set the HTML dir attribute or CSS direction alongside the carousel option.

```sh
npm install embla-carousel
```

**shadcn-ui/ui** (128.3K stars)

[shadcn-ui/ui](https://github.com/shadcn-ui/ui) 

```javascript
function Carousel({
  orientation = "horizontal",
  opts,
  setApi,
  plugins,
  className,
  children,
  ...props
}: React.ComponentProps<"div"> & CarouselProps) {
  const [carouselRef, api] = useEmblaCarousel(
    {
      ...opts,
      axis: orientation === "horizontal" ? "x" : "y",
    },
    plugins
  )
  const [canScrollPrev, setCanScrollPrev] = React.useState(false)
  const [canScrollNext, setCanScrollNext] = React.useState(false)

  const onSelect = React.useCallback((api: CarouselApi) => {
    if (!api) return
    setCanScrollPrev(api.canScrollPrev())
    setCanScrollNext(api.canScrollNext())
  }, [])

  const scrollPrev = React.useCallback(() => {
    api?.scrollPrev()
  }, [api])

  const scrollNext = React.useCallback(() => {
    api?.scrollNext()
  }, [api])

  const handleKeyDown = React.useCallback(
    (event: React.KeyboardEvent<HTMLDivElement>) => {
      if (event.key === "ArrowLeft") {
        event.preventDefault()
        scrollPrev()
      } else if (event.key === "ArrowRight") {
        event.preventDefault()
        scrollNext()
      }
    },
    [scrollPrev, scrollNext]
  )

  React.useEffect(() => {
    if (!api || !setApi) return
    setApi(api)
  }, [api, setApi])

  React.useEffect(() => {
    if (!api) return
    onSelect(api)
    api.on("reInit", onSelect)
    api.on("select", onSelect)

    return () => {
      api?.off("select", onSelect)
    }
  }, [api, onSelect])

  return (
    <CarouselContext.Provider
      value={{
        carouselRef,
        api: api,
        opts,
        orientation:
          orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
        scrollPrev,
        scrollNext,
        canScrollPrev,
        canScrollNext,
      }}
    >
      <div
        onKeyDownCapture={handleKeyDown}
        className={cn("relative", className)}
        role="region"
        aria-roledescription="carousel"
        data-slot="carousel"
        {...props}
      >
        {children}
      </div>
    </CarouselContext.Provider>
  )
}
```

[apps/v4/registry/new-york-v4/ui/carousel.tsx](https://github.com/shadcn-ui/ui/blob/c257f688cf4de7ec10cc1be84cad29cd4631182c/apps/v4/registry/new-york-v4/ui/carousel.tsx#L45-L133) · [More projects using embla-carousel →](https://dashboard.exa.ai/playground/search?q=Projects%20using%20embla-carousel%20for%20carousel%20navigation&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```javascript
<style>
.embla { overflow: hidden; }
.embla__container { display: flex; }
.embla__slide { flex: 0 0 100%; min-width: 0; }
</style>
<div class="embla"><div class="embla__container">
  <div class="embla__slide">One</div><div class="embla__slide">Two</div>
</div></div>
<script src="./node_modules/embla-carousel/embla-carousel.umd.js"></script>
<script>EmblaCarousel(document.querySelector(".embla"));</script>

```

From [module](https://www.embla-carousel.com/docs/v8/get-started/module)

### Bootstrap

[GitHub](https://github.com/twbs/bootstrap) · [npm](https://www.npmjs.com/package/bootstrap) · [Docs](https://getbootstrap.com/docs/5.3/components/carousel/)

Includes a carousel component that cycles through images, text, or custom markup.

- Downloads / mo: 30.4M
- Stars: 175.1K
- Last release: 5.3.9
- License: MIT
- Capabilities: [From the Bootstrap docs](https://getbootstrap.com/docs/5.3/components/carousel/)

**Watch out for**

- **Needs manual initialization.** Initialize each carousel with its constructor so touch and swipe events attach.

```sh
npm install bootstrap@5.3.9
```

**havit/Havit.Blazor** (602 stars)

[havit/Havit.Blazor](https://github.com/havit/Havit.Blazor) 

```javascript
export function slideTo(element, index) {
	const c = bootstrap.Carousel.getInstance(element);
	if (c) {
		c.to(index);
	}
}
```

[Havit.Blazor.Components.Web.Bootstrap/wwwroot/HxCarousel.js](https://github.com/havit/Havit.Blazor/blob/c360f484bfcf94690bf827779e77d1de477c608b/Havit.Blazor.Components.Web.Bootstrap/wwwroot/HxCarousel.js#L11-L16) · [More projects using Bootstrap →](https://dashboard.exa.ai/playground/search?q=bootstrap%20GitHub%20projects)

**Quickstart**

```javascript
const carousel = new bootstrap.Carousel('#myCarousel')

```

From [carousel](https://getbootstrap.com/docs/5.3/components/carousel/)

### Swiper

[GitHub](https://github.com/nolimits4web/swiper) · [npm](https://www.npmjs.com/package/swiper) · [Docs](https://swiperjs.com)

Provides configurable touch sliders with navigation, pagination, and animation modules.

- Downloads / mo: 21.1M
- Stars: 41.9K
- Last release: 14.4.0
- License: MIT
- Capabilities: [From the Swiper docs](https://swiperjs.com)

**Strengths**

- **Navigates slides with the keyboard.** Enable the keyboard module to move between slides.
- **Adapts layout at breakpoints.** Change visible slide counts and spacing for different screen sizes.

**Watch out for**

- **Looping needs enough slides.** Match slide counts to slidesPerView and slidesPerGroup before enabling loop.
- **Breakpoints cannot change every option.** Set loop and effect outside breakpoint overrides.

```sh
npm install swiper
```

**supabase/supabase** (115.1K stars)

[supabase/supabase](https://github.com/supabase/supabase) 

```javascript
function SplitCodeBlockCarousel(props: SplitCodeBlockCarousel) {
  // store API swiper instance
  const [apiSwiper, setApiSwiper] = useState<SwiperClass | undefined>(undefined)
  const [swiperDetails, setSwiperDetails] = useState<SwiperClass | undefined>(undefined)

  const [apiSwiperActiveIndex, setApiSwiperActiveIndex] = useState(0)

  function handleApiSwiperNavChange(e: number) {
    setApiSwiperActiveIndex(e)
    if (!apiSwiper || !swiperDetails) return
    apiSwiper.slideTo(e)
    swiperDetails.slideTo(e)
  }

  return (
    <div className="sbui-tabs--alt col-span-12 space-y-2 lg:col-span-6 lg:col-start-7">
      <div className="flex gap-2 mb-2 flex-nowrap overflow-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden">
        {props.content.map((extension, i) => {
          return (
            <Button
              type="default"
              className={cn('shrink-0', { 'opacity-50': i !== apiSwiperActiveIndex })}
              onClick={() => handleApiSwiperNavChange(i)}
              key={i}
              disabled={!apiSwiper || !swiperDetails}
            >
              {extension.title}
            </Button>
          )
        })}
      </div>

      <Swiper
        onSwiper={setApiSwiper}
        style={{ zIndex: 0 }}
        initialSlide={apiSwiperActiveIndex}
        spaceBetween={0}
        slidesPerView={1}
        speed={300}
        autoHeight={true}
        allowTouchMove={false}
      >
        {props.content.map((extension, i) => {
          return (
            <SwiperSlide key={i}>
              <CodeBlock key={i} lang={extension.lang}>
                {extension.code}
              </CodeBlock>
            </SwiperSlide>
          )
        })}
      </Swiper>

      <div className="bg-surface-100 border-default overflow-hidden rounded-md border p-8">
        <Swiper
          onSwiper={setSwiperDetails}
          style={{ zIndex: 0 }}
          initialSlide={0}
          spaceBetween={0}
          slidesPerView={1}
          direction="horizontal"
          // style={{ overflow: 'hidden' }}
          speed={300}
          allowTouchMove={false}
        >
          {props.content.map((extension, i) => {
            return (
              <SwiperSlide key={i}>
                <p>
                  <span className="text-foreground mb-4 block text-lg">
                    {extension.detail_title}
                  </span>
                </p>
                <p className="p mb-6 block">{extension.detail_text}</p>
                <Space className="justify-between">
                  {extension.url && (
                    <Button asChild type="default">
                      <Link href={extension.url} as={extension.url} className="ml-px">
                        View documentation
                      </Link>
                    </Button>
                  )}
                  <div>
                    <p className="p mr-4">{extension.badges_label}</p>
                    {extension.badges &&
                      extension.badges.map((badge, i) => {
                        return <Badge key={badge}>{badge}</Badge>
                      })}
                  </div>
                </Space>
              </SwiperSlide>
            )
          })}
        </Swiper>
      </div>
    </div>
  )
}
```

[apps/www/components/Carousels/SplitCodeBlockCarousel.tsx](https://github.com/supabase/supabase/blob/62feb52b64916193e221a9a1f8b68dadc7b6d400/apps/www/components/Carousels/SplitCodeBlockCarousel.tsx#L30-L127) · [More projects using Swiper →](https://dashboard.exa.ai/playground/search?q=Projects%20using%20swiper%20for%20carousel%20navigation&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```javascript
<link rel="stylesheet" href="./node_modules/swiper/swiper-bundle.css">
<div class="swiper"><div class="swiper-wrapper">
  <div class="swiper-slide">One</div><div class="swiper-slide">Two</div>
</div></div>
<script type="module">
import Swiper from "./node_modules/swiper/swiper-bundle.mjs";
new Swiper(".swiper");
</script>

```

From [get-started](https://swiperjs.com/get-started)

### react-slick

[GitHub](https://github.com/akiran/react-slick) · [npm](https://www.npmjs.com/package/react-slick) · [Docs](https://react-slick.neostack.com)

Provides a React carousel component ported from Slick.

- Downloads / mo: 7.3M
- Stars: 11.9K
- Last release: 0.31.0
- License: MIT
- Capabilities: [From the react-slick docs](https://react-slick.neostack.com)

**Watch out for**

- **Styles come from slick-carousel.** Install slick-carousel and import its CSS for the default look.

```sh
npm install react react-dom react-slick slick-carousel
```

**openedx/openedx-platform** (8.2K stars)

[openedx/openedx-platform](https://github.com/openedx/openedx-platform) 

```jsx
render() {
        const carouselSettings = {
            accessibility: true,
            dots: true,
            infinite: false,
            speed: 500,
            className: 'carousel-wrapper',
            nextArrow: <NextArrow displayedSlides={1} />,
            prevArrow: <PrevArrow />,
            afterChange: this.afterChange,
            slidesToShow: 1,
            slidesToScroll: 1,
            initialSlide: 0,
        };

        return (
            <Slider {...carouselSettings}>
                {this.getCarouselContent()}
            </Slider>
        );
    }
```

[common/static/common/js/components/ExperimentalCarousel.jsx](https://github.com/openedx/openedx-platform/blob/852401519be5145fc0770cbfe99dc688ff80c7bc/common/static/common/js/components/ExperimentalCarousel.jsx) · [More projects using react-slick →](https://dashboard.exa.ai/playground/search?q=react-slick%20GitHub%20projects)

**Quickstart**

```jsx
import Slider from 'react-slick';
import 'slick-carousel/slick/slick.css';
import 'slick-carousel/slick/slick-theme.css';
export default function App() {
  return <Slider><div>One</div><div>Two</div></Slider>;
}

```

From [README.md](https://cdn.jsdelivr.net/npm/react-slick@0.31.0/README.md)

### react-bootstrap

[GitHub](https://github.com/react-bootstrap/react-bootstrap) · [npm](https://www.npmjs.com/package/react-bootstrap) · [Docs](https://react-bootstrap.github.io/)

Provides the Bootstrap carousel as a React component with controlled or uncontrolled slide state.

- Downloads / mo: 6.6M
- Stars: 22.6K
- Last release: 2.10.10
- License: MIT
- Capabilities: [From the react-bootstrap docs](https://react-bootstrap.github.io/)

```sh
npm install react-bootstrap bootstrap
```

**bradtraversy/proshop-v2** (720 stars)

[bradtraversy/proshop-v2](https://github.com/bradtraversy/proshop-v2) 

```jsx
const ProductCarousel = () => {
  const { data: products, isLoading, error } = useGetTopProductsQuery();

  return isLoading ? null : error ? (
    <Message variant='danger'>{error?.data?.message || error.error}</Message>
  ) : (
    <Carousel pause='hover' className='bg-primary mb-4'>
      {products.map((product) => (
        <Carousel.Item key={product._id}>
          <Link to={`/product/${product._id}`}>
            <Image src={product.image} alt={product.name} fluid />
            <Carousel.Caption className='carousel-caption'>
              <h2 className='text-white text-right'>
                {product.name} (${product.price})
              </h2>
            </Carousel.Caption>
          </Link>
        </Carousel.Item>
      ))}
    </Carousel>
  );
};
```

[frontend/src/components/ProductCarousel.jsx](https://github.com/bradtraversy/proshop-v2/blob/e23e3a897e5387f39da6c59fd72cdd12e46d0815/frontend/src/components/ProductCarousel.jsx#L6-L27) · [More projects using react-bootstrap →](https://dashboard.exa.ai/playground/search?q=react-bootstrap%20GitHub%20projects)

**Quickstart**

```jsx
import Carousel from 'react-bootstrap/Carousel';
import 'bootstrap/dist/css/bootstrap.min.css';

export default function Example() {
  return (
    <Carousel>
      <Carousel.Item><p>First slide</p></Carousel.Item>
      <Carousel.Item><p>Second slide</p></Carousel.Item>
    </Carousel>
  );
}

```

From [Carousel.tsx](https://api.github.com/repos/react-bootstrap/react-bootstrap/git/blobs/8590416efa3078ae4cb07e59aa32f29420a668ae#decoded)

### @zag-js/carousel

[GitHub](https://github.com/chakra-ui/zag) · [npm](https://www.npmjs.com/package/@zag-js/carousel) · [Docs](https://github.com/chakra-ui/zag#readme)

Provides carousel logic as a state machine that scrolls slides with native CSS Scroll Snap.

- Downloads / mo: 6.5M
- Stars: 5.3K
- Last release: 1.48.0
- License: MIT
- Capabilities: [From the @zag-js/carousel docs](https://github.com/chakra-ui/zag#readme)

```sh
npm install react react-dom @zag-js/carousel @zag-js/react
```

**chakra-ui/ark** (5.5K stars)

[chakra-ui/ark](https://github.com/chakra-ui/ark) 

```jsx
export const useCarousel = (props: UseCarouselProps): UseCarouselReturn => {
  const id = useId()
  const { getRootNode } = useEnvironmentContext()
  const { dir } = useLocaleContext()

  const machineProps: carousel.Props = {
    id,
    dir,
    getRootNode,
    ...props,
  }

  const service = useMachine(carousel.machine, machineProps)
  return carousel.connect(service, normalizeProps)
}
```

[packages/react/src/components/carousel/use-carousel.ts](https://github.com/chakra-ui/ark/blob/0a6ee9ebec4a719f3d4ebb9c92b4ff069ba9a915/packages/react/src/components/carousel/use-carousel.ts) · [More projects using @zag-js/carousel →](https://dashboard.exa.ai/playground/search?q=%40zag-js/carousel%20GitHub%20projects)

**Quickstart**

```jsx
import * as carousel from '@zag-js/carousel';
import { normalizeProps, useMachine } from '@zag-js/react';
import { useId } from 'react';
export default function App() {
  const service = useMachine(carousel.machine, { id: useId(), slideCount: 2 });
  const api = carousel.connect(service, normalizeProps);
  return <div {...api.getRootProps()}>
    <div {...api.getItemGroupProps()}>
      {[0, 1].map(index => <div key={index} {...api.getItemProps({ index })}>{index + 1}</div>)}
    </div>
  </div>;
}

```

From [carousel](https://zagjs.com/components/react/carousel)

### slick-carousel

[GitHub](https://github.com/kenwheeler/slick) · [npm](https://www.npmjs.com/package/slick-carousel) · [Docs](https://github.com/kenwheeler/slick#readme)

Runs as a carousel plugin for jQuery.

- Downloads / mo: 5.7M
- Stars: 28.5K
- Last release: 2.0.0
- License: MIT
- Capabilities: [From the slick-carousel docs](https://github.com/kenwheeler/slick#readme)

```sh
npm install jquery@4 slick-carousel
```

**googlecreativelab/chrome-music-lab** (2.4K stars)

[googlecreativelab/chrome-music-lab](https://github.com/googlecreativelab/chrome-music-lab) 

```html
var SnapScroll = function(container, change, init){
		$(container).slick({
			dots : false,
			accessibility : false,
			arrows : true,
			infinite: false,
		}).on("beforeChange", function(e, slick, currentSlide, nextSlide){
			change(currentSlide, nextSlide);
		}).on("mousedown touchstart", function(e){
			//update the chord on touch
			if (init){
				init();
			}
		});

		$(container).find(".slick-arrow").addClass("Button").on("click", function(e){
			e.preventDefault();
			e.stopPropagation();
			$(e.target).blur();
		});

		//remove the text label
		$(container).find(".slick-arrow").text("");

		/*$(window).on("resize", function(){
			console.log('here');
			$(container).width($(window).width());
		});*/

	};
```

[arpeggios/app/part/SnapScroll.js](https://github.com/googlecreativelab/chrome-music-lab/blob/e54bb414908da2b6286a6ad6431a5fcf8b68dc3f/arpeggios/app/part/SnapScroll.js) · [More projects using slick-carousel →](https://dashboard.exa.ai/playground/search?q=slick-carousel%20GitHub%20projects)

**Quickstart**

```html
<link rel="stylesheet" href="./node_modules/slick-carousel/slick/slick.css">
<div class="slider"><div>One</div><div>Two</div></div>
<script src="./node_modules/jquery/dist/jquery.js"></script>
<script src="./node_modules/slick-carousel/slick/slick.js"></script>
<script>$(".slider").slick();</script>

```

From [README.markdown](https://cdn.jsdelivr.net/npm/slick-carousel@2.0.0/README.markdown)

### React Responsive Carousel

[GitHub](https://github.com/leandrowd/react-responsive-carousel) · [npm](https://www.npmjs.com/package/react-responsive-carousel) · [Docs](http://leandrowd.github.io/react-responsive-carousel/)

Provides a React carousel with swipe, keyboard navigation, and autoplay.

- Downloads / mo: 4.6M
- Stars: 2.7K
- Last release: 3.2.23
- License: MIT
- Capabilities: [From the React Responsive Carousel docs](http://leandrowd.github.io/react-responsive-carousel/)

**Watch out for**

- **Not actively maintained.** The maintainer has no time to maintain the package and suggests forking it.

```sh
npm install react react-dom react-responsive-carousel
```

**glideapps/glide-data-grid** (5.4K stars)

[glideapps/glide-data-grid](https://github.com/glideapps/glide-data-grid) 

```jsx
export const ImageOverlayEditor: React.FunctionComponent<OverlayImageEditorProps> = p => {
    const { urls, canWrite, onEditClick, renderImage } = p;

    const filtered = urls.filter(u => u !== "");

    if (filtered.length === 0) {
        return null;
    }

    const allowMove = filtered.length > 1;
    return (
        <ImageOverlayEditorStyle data-testid="GDG-default-image-overlay-editor">
            <Carousel
                showArrows={allowMove}
                showThumbs={false}
                swipeable={allowMove}
                emulateTouch={allowMove}
                infiniteLoop={allowMove}>
                {filtered.map(url => {
                    const innerContent = renderImage?.(url) ?? <img draggable={false} src={url} />;
                    return (
                        <div className="gdg-centering-container" key={url}>
                            {innerContent}
                        </div>
                    );
                })}
            </Carousel>
            {canWrite && onEditClick && (
                <button className="gdg-edit-icon" onClick={onEditClick}>
                    <EditPencil />
                </button>
            )}
        </ImageOverlayEditorStyle>
    );
};
```

[packages/core/src/internal/data-grid-overlay-editor/private/image-overlay-editor.tsx](https://github.com/glideapps/glide-data-grid/blob/0875d78cc41535a39f8b417ff88ce1ebe129c363/packages/core/src/internal/data-grid-overlay-editor/private/image-overlay-editor.tsx) · [More projects using React Responsive Carousel →](https://dashboard.exa.ai/playground/search?q=react-responsive-carousel%20GitHub%20projects)

**Quickstart**

```jsx
import { Carousel } from 'react-responsive-carousel';
import 'react-responsive-carousel/lib/styles/carousel.min.css';
export default function App() {
  return <Carousel showThumbs={false}><div>One</div><div>Two</div></Carousel>;
}

```

From [README.md](https://cdn.jsdelivr.net/npm/react-responsive-carousel@3.2.23/README.md)

## FAQ

### Which JavaScript carousel library should I use?

[Embla Carousel](#embla-carousel) and [Swiper](#swiper) run without React or jQuery and handle touch swiping. [React Slick](#react-slick) and [React Responsive Carousel](#react-responsive-carousel) are React components, while [Slick](#slick-carousel) itself still needs jQuery.

### What is Embla Carousel?

[Embla Carousel](#embla-carousel) is a carousel engine that leaves the markup and CSS to the app and supplies an API for scrolling and focus handling. It has the most monthly downloads of these libraries, at 119.0M.

### Which carousel libraries work in React?

React Slick, [React Bootstrap](#react-bootstrap), and React Responsive Carousel are React components. Embla Carousel ships a `useEmblaCarousel` hook, and Swiper and [Zag Carousel](#zag-js-carousel) also offer React integrations.

### Does Swiper looping work with any number of slides?

Loop mode requires enough slides relative to slidesPerView and slidesPerGroup, plus its grouping constraints.

### Why can Embla stop looping with short content?

It falls back to a non-looping carousel when content cannot form a loop without visible glitches.

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "Best JavaScript carousel libraries Swiper Embla Splide Glide code examples",
    "numResults": 5
  }
}
```

Docs: https://exa.ai/docs/reference/search
