# roll_text

> 滚动吧，字幕君

Latest version **0.0.6** (published 2020-11-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install roll_text
pnpm add roll_text
yarn add roll_text
bun add roll_text
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2020-11-01 |
| First published | 2020-10-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 19.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | lizhaji |
| Maintainers | fried_salad |
| Keywords | roll, text, marquee |

## Links

- npm: https://www.npmjs.com/package/roll_text
- Repository: https://github.com/LiZhaji/roll_text
- Homepage: https://github.com/LiZhaji/roll_text#readme
- Issues: https://github.com/LiZhaji/roll_text/issues
- npm.io page: https://npm.io/package/roll_text

## Dependencies (1)

- [@babel/polyfill](https://npm.io/package/@babel/polyfill.md) ^7.12.1

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 0.0.6 (latest) — 2020-11-01
- 0.0.5 — 2020-11-01
- 0.0.4 — 2020-11-01
- 0.0.3 — 2020-10-29
- 0.0.2 — 2020-10-29
- 0.0.1 — 2020-10-28

## README

功能：字幕滚动，可开始、停止、重置。支持文字内容与速度的改变。

当前版本：[v0.0.6](git@github.com:LiZhaji/roll_text.git)

# usage

## npm

```js
npm i roll_text
```


```js
const Roll = require('roll_text')
// or
import Roll from 'roll_text';

const options = {
  container: '#box', // 必填，选择器
  content: "hello it's a demo", // 选填，文字内容，container为后备内容
  width: 100, // 选填，容器宽度，默认100px
  speed: 1, // 选填，滚动速度 默认1 正常速度，2倍速、0.5倍速
}
const roller = new Roll(options)

roller.start() // 开始滚动
roller.stop() // 停止滚动
roller.reset() // 重置

// 若要改变
```

## cdn

```js
<script src="https://cdn.jsdelivr.net/npm/roll_text@0.0.6/lib/cdn-main.js"></script>
<script>
  const options = {
    container: '#box', // 必填，选择器
    content: "hello it's a demo", // 选填，文字内容，container为后备内容
    width: 100, // 选填，容器宽度，默认100px
    speed: 1, // 选填，滚动速度 默认1 正常速度，2倍速、0.5倍速
  }
  const roller = new Roll(options)
  
</script>
```

---
_Source: https://npm.io/package/roll_text · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
