Skip to content

juji/motionrail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

407 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

MotionRail

A lightweight, smooth carousel library with momentum-based scrolling, snap alignment, and responsive breakpoints. Works with vanilla JavaScript or your favorite framework.

Features

  • ๐ŸŽฏ๓ ……๓ …ž๓ …ข๓ …™๓ …ฆ๓ …‘๓ …œ๓ …•๓ …”๓ „๓ …ฃ๓ …๓ …Ÿ๓ …Ÿ๓ …ค๓ …˜๓ …ž๓ …•๓ …ฃ๓ …ฃ๓ „๓ …‘๓ …ž๓ …”๓ „๓ …“๓ …Ÿ๓ …ž๓ …ค๓ …ข๓ …Ÿ๓ …œ 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

Installation

npm install motionrail

Quick Start

Vanilla JavaScript

<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" },
  ],
});

React

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>
  );
}

With Extensions

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 })],
});

Autoplay Example

const carousel = new MotionRail(element, {
  autoplay: true,
  delay: 3000,
  resumeDelay: 4000,
  breakpoints: [
    { columns: 1, gap: "16px" },
    { width: 768, columns: 2, gap: "16px" },
  ],
});

Recent Updates

  • Docs site AI readiness โ€” llms.txt, llms-full.txt, MCP server, sitemap, robots.txt, .well-known discovery, 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/js to resolve build incompatibility
  • Homepage redesign โ€” improved footer, agent discoverability links in hero

AI Discovery

  • llms.txt โ€” concise AI-friendly summary

  • llms-full.txt โ€” full documentation for AI consumption

  • POST /mcp โ€” MCP server endpoint

    Tool Description
    get_package_info Get package metadata and version
    get_build_status Check CI build status
    search_docs Search MotionRail documentation

Documentation

For complete documentation, API reference, and examples:

https://motionrail.jujiplay.com/

License

MIT


Sponsor juji

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Sponsor this project

 

Packages

 
 
 

Contributors