Motion Blocks

Showcase

Slideshow

Full-bleed image slideshow with parallax slide transitions and thumbnail navigation. Framework-agnostic Custom Element.

  • lit Preview of https://lit.devLitSimple. Fast. Web Components.
  • gsap Preview of https://gsap.comGSAPAnimate anything. Silky-smooth performance.

Preview

Click a thumbnail or use the navigation to transition between slides. The inner image parallaxes opposite the slide direction.

Installation

pnpm dlx motion-blocks add slideshow

Usage

---import "@/components/motion-blocks/slideshow-element.ts";--- <motion-slideshow  images='[{"src":"/1.jpg","alt":"One"},{"src":"/2.jpg","alt":"Two"}]'  class="aspect-video w-full max-w-2xl rounded-xl overflow-hidden"></motion-slideshow>

API Reference

Attribute Type Default
images JSON array of image objects with src and alt properties. string "[]"