@egjs/conveyer

中文文档
1.8.1-alpha.0发布于 2025/09/18MITTypeScriptESM + CJS近 30 天下载 2.1万

Conveyer adds Drag gestures to your Native Scroll.

原始使用文档
文档目录12 节
  1. Demo / Documentation / Other components
  2. ✨ Features
  3. ⚙️ Installation
  4. 🏃 Quick Start
  5. How to use
  6. 📦 Packages
  7. 🌐 Supported Browsers
  8. 📼 Demos
  9. 📖 Documentation
  10. 🙌 Contributing
  11. 📝 Feedback
  12. 📜 License

Conveyer Logo
Conveyer

version npm weekly downloads npm bundle size (scoped) Github actions Coveralls github

Angular React Vue Vue Svelte

Demo / Documentation / Other components

Conveyer adds Drag gestures to your Native Scroll.
📱💻🖥


✨ Features

  • You can use Native Scroll-like behavior through Drag.
  • By adding easing features such as bounce, elasticity, and back, you can create smooth scrolling animations like Native Scroll.
  • Supports Reactive Properties that can change state through properties that automatically detect changes instead of events.
  • You can use custom scroll events like onBeginScroll, onFinishScroll, onReachStart, onLeaveStart,

⚙️ Installation

npm

$ npm install --save @egjs/conveyer

CDN

  • unpkg: https://unpkg.com/@egjs/conveyer/dist/

🏃 Quick Start

HTML

<div class="items">
  <div class="item"></div>
  <div class="item"></div>
  <div class="item"></div>
  <div class="item"></div>
</div>

ES Modules

import Conveyer from "@egjs/conveyer";

const conveyer = new Conveyer(".items");

With CDN

<!-- Packaged with all dependencies -->
<!-- https://naver.github.io/egjs-conveyer/release/latest/dist/conveyer.min.js -->
<script src="https://unpkg.com/@egjs/conveyer/dist/conveyer.min.js"></script>
<script>
const conveyer = new Conveyer(".items");
</script>

How to use

HTML

<button class="prev">prev</button>
<button class="next">next</button>
<div class="items">
  <div class="item"></div>
  <div class="item"></div>
  <div class="item"></div>
  <div class="item"></div>
</div>

JS

import Conveyer from "@egjs/conveyer";

// Since events occur during initialization, set `autoInit` to false if you want to register events.
const conveyer = new Conveyer(".items", {
  autoInit: false,
});

const prev = document.querySelector(".prev");
const next = document.querySelector(".next");

prev.addEventListener("click", () => {
  // start to end
  conveyer.scrollIntoView("start", {
    align: "end",
    duration: 500,
    excludeStand: true,
  });
});
next.addEventListener("click", () => {
  // end to start
  conveyer.scrollIntoView("end", {
    align: "start",
    duration: 500,
    excludeStand: true,
  });
});
conveyer.subscribe("isReachStart", value => {
  prev.disabled = value;
});
conveyer.subscribe("isReachEnd", value => {
  next.disabled = value;
});

conveyer.init();

📦 Packages

PackageVersionDescription
@egjs/ngx-conveyerversionAngular Angular port of @egjs/conveyer
@egjs/react-conveyerversionReact React port of @egjs/conveyer
@egjs/vue-conveyerversionVue.js Vue.js@3 port of @egjs/conveyer
@egjs/vue2-conveyerversionVue.js Vue.js@2 port of @egjs/conveyer
@egjs/svelte-conveyerversionSvelte Svelte port of @egjs/conveyer

🌐 Supported Browsers

IEChromeFirefoxSafariiOSAndroid
9+(With polyfill), 11+ for Angular & SvelteLatestLatestLatest7+4+

📼 Demos

Check our Demos.

📖 Documentation

See Documentation page.

🙌 Contributing

See CONTRIBUTING.md.

📝 Feedback

Please file an Issue.

📜 License

@egjs/conveyer is released under the MIT license.

Copyright (c) 2022-present NAVER Corp.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

      

版本与发布记录

@egjs/conveyer 共发布 51 个版本,首次发布于 2022/02/21;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.8.1-alpha.0latest2025/09/181.2 年前
1.9.0-beta.0beta2025/08/181.2 年前
1.8.02025/04/181.6 年前
1.8.0-beta.02025/03/201.7 年前
1.7.12023/09/273 年前
1.7.1-beta.12023/09/273 年前

关于 @egjs/conveyer 的常见问题

@egjs/conveyer 是什么?

Conveyer adds Drag gestures to your Native Scroll.

如何安装 @egjs/conveyer?

在项目目录运行 npm install @egjs/conveyer,或使用 pnpm add / yarn add / bun add。

@egjs/conveyer 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@egjs/conveyer 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@egjs/conveyer 可以商用吗?

@egjs/conveyer 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@egjs/conveyer 的下载量有多少?

根据 npm 官方下载统计,@egjs/conveyer 在 2026/10/13 – 2026/11/11 这 30 天内被下载 21,247 次,日均约 708 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@egjs/conveyer 还在维护吗?

最新版本 1.8.1-alpha.0 发布于 2025/09/18(1.2 年前);至今共发布 51 个版本,其中过去 12 个月发布了 0 个;首次发布于 2022/02/21。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。