Embla Carousel
Lightweight carousel component with fluid motion and precise swipe handling for React.
3. Used by agents' projects
Dependency in 311 public GitHub projects set up for AI coding agents that we scanned (5.0%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error
What Embla Carousel does
Embla supplies only the carousel logic and ships no styles or UI, so you write the markup, CSS and buttons yourself and add extras such as autoplay through separate plugins.
Embla Carousel popularity
Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated
How Embla Carousel is used
- Embla Carousel is a dependency in 311 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (6.4% of the 4,867 JavaScript/TypeScript ones), #4 of 46 in animation and motion.
- Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 1,427; those are left out of every share on this page.
- Projects that use it most often also use Class Variance Authority (98.1%), clsx (98.1%), Lucide React (97.7%).
- It is more common in projects set up for Roo Code (11.7%) than for Gemini CLI (2.7%).
By coding agent
Often used with
Embla Carousel in practice
Strengths
Embla adds no stylesheet, so you can use any styling approach. The Best Buy Canada developer called this their favorite thing about the library and used Tailwind.
Extra behavior such as auto-scroll lives in its own package. One builder writes that "we pay only for features we use."
The docs offer pre-made sandboxes for loop, right-to-left, Y-axis, variable widths, thumbnails and slides per view. There are also plugin examples (accessibility, autoplay, fade, auto height), tween effects such as parallax and opacity, and engine examples like lazy load and an iOS-style picker.
The Embla site has a builder that generates navigation code for buttons, dots and auto-scroll. You paste that code into your own codebase instead of importing prebuilt components.
Watch out for
The documentation site describes v9.0.0-rc04, while the latest tagged release on GitHub is v8.6.0. The docs say the RC "can be considered stable". If you are on the stable line, switch to the v8 docs.
Because nothing ships pre-built, you have to write the layout and controls yourself. The Best Buy Canada developer listed setup time among their frustrations.
The same developer found the built-in next and previous behavior inconsistent with what they wanted. They fixed it with helpers that read <code>emblaApi.internalEngine()</code>, based on a GitHub issue.
More about Embla Carousel
Funding
- GitHub Sponsors: https://github.com/davidjerleke
- 3 GitHub sponsors
Packages around it
- class-variance-authority: variant class builder
- clsx: className joiner
- lucide-react: icon set
- tailwind-merge: Tailwind class merging
- @radix-ui: headless UI primitives
- cmdk: command menu
More in Animation and motion
Alternatives
Embla Carousel This page
Get started
Install it.
npm install embla-carousel-reactRules for your agent
## Embla Carousel
- Check the installed major version first. The docs site defaults to v9.0.0-rc04, so use the v8 docs if the project is on 8.x.
- Embla ships no CSS. Write the viewport, container and slide styles yourself. The doc examples use a flexbox layout.
- In React, call `useEmblaCarousel(options, plugins)`, put the returned ref on the viewport element, and guard against an undefined API before calling methods.
- Add features with the official plugins (autoplay, auto-scroll, auto height, fade, class names, accessibility) rather than hand-rolling them.
- Start from the matching predefined CodeSandbox (loop, thumbnails, lazy load, progress and others) instead of writing from scratch.
- Type options and the API with `EmblaOptionsType` and `EmblaCarouselType`.