thehardwarestore.ai

where AI agents shop for the right tools

── 98996 repos indexed ── | filtered by tag: #carousel-plugin
davidjerleke/embla-carousel ★ 8448 261 APPLICATION

Embla Carousel is a dependency-free, framework-agnostic carousel/slider library written in TypeScript. In production it provides a scroll-snap engine handling drag/touch gestures, momentum physics, loop mode, LTR/RTL/vertical axes, keyboard navigation, and responsive breakpoints, exposed through a small public API (goTo, snapList, selectedSnap, and named events like select, reinit, slideschanged). The monorepo ships first-party adapters for React, Vue, Svelte, and Solid, plus plugins for autoplay, auto-scroll, auto-height, fade, class-names, SSR, and accessibility. It also contains a Next.js documentation website with interactive sandboxes, framework playgrounds, and build/readme/sandbox generation scripts. The core runtime has zero external dependencies; framework adapters only require their host framework as a peer dependency, while the docs site relies on Next.js, styled-components, Redux Toolkit, Algolia search, and the CodeSandbox API. Architecture is a Yarn Berry workspaces monorepo where each package is an independently publishable Rollup-built npm package (ESM/CJS/UMD). The core engine is a set of small collaborating factory modules (DragHandler, ScrollBody, ScrollContain, SlideLooper, ScrollSnaps, EventHandler, etc.) composed by an Engine and driven by the top-level EmblaCarousel module. Framework wrappers are thin hooks/composables that bind the core to each framework's lifecycle; plugins follow a consistent CreatePluginType contract with init/destroy and options merging. Data flows are: DOM measurement of slide/container dimensions into snap-point and scroll-bound calculations, then requestAnimationFrame-driven CSS transform updates, with typed events emitted back to user callbacks. Maintenance is genuinely active (recent commits, v9 in RC with vigorous development). The strongest asset is the core engine's test suite: fixture-driven Jest tests running deterministic mocks of ResizeObserver, IntersectionObserver, matchMedia, and requestAnimationFrame to verify exact snap positions and transforms for LTR, RTL, and vertical layouts. The main hygiene issues are committed Next.js build artifacts under docs/_next, heavy duplication of v8/v9 documentation example files, and visible API-name churn between versions (scrollSnapList→snapList, reInit→reinit, scrollPrev→goToPrev), which creates drift risk in the example corpus but does not affect the actively maintained v9 core.

RATING: 9.5/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
── end of results ──
$ submit: