A lightweight, smooth carousel library with momentum-based scrolling, snap alignment, and responsive breakpoints. Works with vanilla JavaScript or your favorite framework.
- ๐ฏ๓ ๓ ๓ ข๓ ๓ ฆ๓ ๓ ๓ ๓ ๓ ๓ ฃ๓ ๓ ๓ ๓ ค๓ ๓ ๓ ๓ ฃ๓ ฃ๓ ๓ ๓ ๓ ๓ ๓ ๓ ๓ ๓ ค๓ ข๓ ๓ Momentum-based scrolling - Natural drag physics with smooth animations
- ๐ฑ๓ ต๓ ๓ ๓ ๓ ข๓ ค๓ ๓ ๓ ฃ๓ ฃ๓ ๓ ข๓ ๓ ฃ๓ ๓ ๓ ๓ ฃ๓ ๓ ฆ๓ ๓ ๓ ๓ ๓ ฉ๓ ๓ ฅ๓ ค๓ ฃ Responsive breakpoints - Configure columns and gaps for different screen sizes
- โฟ๓ ๓ ข๓ ๓ ๓ ๓ ฃ๓ ๓ ๓ ๓ ๓ ฃ๓ ๓ ๓ ๓ ๓ ๓ ๓ ๓ ๓ ๓ ๓ ๓ ๓ ค๓ ๓ ๓ ๓ ๓ ง๓ ๓ ฉ๓ ฃ๓ ๓ ๓ ๓ ข๓ ๓ ๓ ๓ ค Snap alignment - Automatic snap-to-item positioning
- ๐๓ ฑ๓ ฅ๓ ค๓ ๓ ๓ ๓ ๓ ฉ๓ ๓ ค๓ ๓ ๓ ค๓ ๓ ๓ ๓ ๓ ๓ ฃ๓ ๓ ๓ ๓ ค๓ ฅ๓ ข๓ ๓ Autoplay support - Optional auto-scrolling with pause on interaction
โ๏ธ ๓ ๓ ๓ ผ๓ ๓ ฃ๓ ฅ๓ ๓ ๓ ๓ ข๓ ค๓ ๓ ๓ ๓ ๓ ๓ ๓ ๓ ๓ ๓ ข๓ ๓ ๓ ๓ ฃ๓ ๓ ฃ RTL support - Built-in right-to-left layout support- ๐จ๓ ฝ๓ ๓ ๓ ๓ ข๓ ๓ ๓ ณ๓ ๓ ๓ ๓ ท๓ ข๓ ๓ ๓ ๓ ๓ ๓ ฃ๓ ค๓ ๓ ข๓ ฉ CSS Grid based - Modern layout with customizable styling
- ๐ชถ๓ ฝ๓ ๓ ๓ ๓ ๓ ๓ ๓ ๓ ๓ ฅ๓ ๓ ค๓ ข๓ ๓ ๓ ๓ ๓ ๓ ๓ ค๓ ง๓ ๓ ๓ ๓ ๓ ค Lightweight - Zero dependencies, minimal bundle size
- ๐ฎ๓ ๓ ๓ ค๓ ๓ ๓ ๓ ฑ๓ ๓ น๓ ๓ ๓ ๓ ๓ ค๓ ข๓ ๓ ๓ ๓ ๓ ๓ ๓ ๓ ๓ ๓ ๓ ๓ ค๓ ฃ Full control API - Programmatic navigation and playback control
- ๐งฉ๓ ต๓ จ๓ ค๓ ๓ ๓ ฃ๓ ๓ ๓ ๓ ฃ๓ ๓ ๓ ๓ ข๓ ๓ ๓ ๓ ๓ ๓ ๓ ฃ๓ ฃ๓ ๓ ๓ ๓ ฃ๓ ฃ๓ ๓ ๓ ๓ ๓ ๓ ค๓ ๓ ๓ ฃ Extension system - Modular architecture with built-in extensions
- โก๓ ๓ ๓ ๓ ๓ ๓ ๓ ฃ๓ ฃ๓ ๓ ๓ ข๓ ๓ ๓ ๓ ง๓ ๓ ข๓ ๓ ๓ ๓ ๓ ค๓ ๓ ๓ ข๓ ๓ ค๓ ๓ ๓ Framework integrations - React, Preact, Qwik, Solid, Vue, Svelte components
npm install motionrail<div data-motionrail id="carousel">
<div data-motionrail-scrollable>
<div data-motionrail-grid>
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
</div>
</div>
</div>import { MotionRail } from "motionrail";
import "motionrail/style.css";
const carousel = new MotionRail(document.getElementById("carousel"), {
breakpoints: [
{ columns: 1, gap: "16px" },
{ width: 768, columns: 2, gap: "16px" },
{ width: 1024, columns: 3, gap: "20px" },
],
});import { MotionRail } from "motionrail/react";
import "motionrail/style.css";
function App() {
return (
<MotionRail options={{ breakpoints: [{ columns: 3, gap: "20px" }] }}>
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
</MotionRail>
);
}import { MotionRail } from "motionrail";
import { Arrows } from "motionrail/extensions/arrows";
import { Dots } from "motionrail/extensions/dots";
import "motionrail/style.css";
import "motionrail/extensions/arrows/style.css";
import "motionrail/extensions/dots/style.css";
const carousel = new MotionRail(element, {
breakpoints: [
{ columns: 1, gap: "16px" },
{ width: 768, columns: 2, gap: "16px" },
],
extensions: [Arrows({ loop: true }), Dots({ showIndex: true })],
});const carousel = new MotionRail(element, {
autoplay: true,
delay: 3000,
resumeDelay: 4000,
breakpoints: [
{ columns: 1, gap: "16px" },
{ width: 768, columns: 2, gap: "16px" },
],
});- Docs site AI readiness โ llms.txt, llms-full.txt, MCP server, sitemap, robots.txt,
.well-knowndiscovery, Markdown-for-Agents middleware - AI Integration docs โ MCP Readiness and Markdown for Agents pages
- Search โ VitePress local search enabled on docs site
- Qwik fix โ pinned
@eslint/jsto resolve build incompatibility - Homepage redesign โ improved footer, agent discoverability links in hero
-
llms.txt โ concise AI-friendly summary
-
llms-full.txt โ full documentation for AI consumption
-
POST /mcpโ MCP server endpointTool Description get_package_infoGet package metadata and version get_build_statusCheck CI build status search_docsSearch MotionRail documentation
For complete documentation, API reference, and examples:
https://motionrail.jujiplay.com/
MIT