# Embla Carousel

> Small, dependency-free carousel engine with great swipe physics; you bring all the markup and styles.

Source: https://tastebase.ehsanulsiam.workers.dev/browse/embla-carousel

free

Small, dependency-free carousel engine with great swipe physics; you bring all the markup and styles.

by David Jerleke[GitHub](https://github.com/davidjerleke/embla-carousel)[npm](https://npmjs.com/package/embla-carousel-react)

[visit](https://www.embla-carousel.com/?utm_source=tastebase&utm_medium=referral&utm_content=detail-page)

[https://www.embla-carousel.com](https://www.embla-carousel.com/?utm_source=tastebase&utm_medium=referral&utm_content=detail-preview)

## Try these

no preview

### [Swiper](https://tastebase.ehsanulsiam.workers.dev/browse/swiper)

Batteries-included touch slider with effects, virtual slides, thumbs and a11y modules.

no preview

### [shadcn/ui](https://tastebase.ehsanulsiam.workers.dev/browse/shadcn-ui)

Copy-in React components on Tailwind, built on Base UI, Radix or React Aria, plus a registry CLI.

no preview

### [Motion](https://tastebase.ehsanulsiam.workers.dev/browse/motion)

The default animation library for React (formerly Framer Motion): springs, gestures, layout and exit animations.

no preview

### [@use-gesture](https://tastebase.ehsanulsiam.workers.dev/browse/use-gesture)

Hooks that turn pointer, wheel, pinch and scroll events into clean gesture state (offset, velocity, direction).

## Looks that pick it

[Magazinefirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/magazine)[Apple-like](https://tastebase.ehsanulsiam.workers.dev/looks/apple)[iOS native](https://tastebase.ehsanulsiam.workers.dev/looks/ios-native)

## For your agent

##### Install

`npm i embla-carousel-react`

##### Use it for

- a product image gallery with thumbnails
- a horizontally swipeable row of cards on mobile
- a testimonial or logo slider with autoplay (embla-carousel-autoplay plugin)

##### Skip it when

- a simple horizontal scroll row: CSS overflow-x with scroll-snap needs no JS
- you want 3D coverflow, cube or cards effects out of the box: use swiper
- a hero auto-rotating banner: users miss rotating content; show one strong slide instead

##### What's inside23 free

- useEmblaCarousel
- Options
- Methods
- Events
- Autoplay
- Auto Scroll
- Auto Height
- Fade
- Class Names
- Wheel Gestures
- Accessibility
- SSR
- Loop
- Drag Free
- Y-axis
- Thumbnails
- Parallax
- Scale
- Opacity
- Progress
- Lazy Load
- Infinite Scroll
- iOS Style Picker

##### Facts

**Frameworks**
react, vue, svelte, solid, vanilla

**Styling**
unstyled

**Weight**
small

**Accessibility**
weak

**Maturity**
established

**License**
MIT

**Price**
Free

##### Pairs with

[shadcn/ui](https://tastebase.ehsanulsiam.workers.dev/browse/shadcn-ui)[Motion](https://tastebase.ehsanulsiam.workers.dev/browse/motion)

##### Alternatives

[Swiper](https://tastebase.ehsanulsiam.workers.dev/browse/swiper)

```
import useEmblaCarousel from 'embla-carousel-react'

const [emblaRef, emblaApi] = useEmblaCarousel({ loop: true })

<div className="overflow-hidden" ref={emblaRef}>
  <div className="flex">
    {slides.map((s) => (
      <div className="min-w-0 shrink-0 grow-0 basis-full" key={s.id}>{s.content}</div>
    ))}
  </div>
</div>
```

https://www.embla-carousel.com

Loading website

[Visit](https://www.embla-carousel.com/?utm_source=tastebase&utm_medium=referral&utm_content=floating-pill)
