# numberoll

> Vue3 + Css3 简易的数字动效组件，让数字跑起来吧，比德芙更丝滑

Latest version **1.2.1** (published 2023-03-19) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2023-03-19 |
| First published | 2023-03-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 39.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Breezeiii |
| Maintainers | breezeiii |
| Keywords | Vue3, Number, Animate, Roll, 数字, 数字动画 |

## Links

- npm: https://www.npmjs.com/package/numberoll
- Repository: https://github.com/Breezeiii/numberoll
- Homepage: https://breezeiii.github.io/numberoll/#/
- Issues: https://github.com/Breezeiii/numberoll/issues
- npm.io page: https://npm.io/package/numberoll

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^3.2.47
- [numeral](https://npm.io/package/numeral.md) ^2.0.6

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.2.1 (latest) — 2023-03-19
- 1.2.0 — 2023-03-19
- 1.1.8 — 2023-03-19

## README

# Numberoll 

```js
npm i Numberoll -S
```

#### 全局引入

```js
import { createApp } from "vue";
import Numberoll from "Numberoll";
import "Numberoll/dist/style.css";

createApp(App).use(Numberoll ,{/* options */});
```

#### options

默认值，文档查看[numeral](http://numeraljs.com/)

```json
{
      delimiters: {
        thousands: ",",
        decimal: "."
      },
      abbreviations: {
        thousand: "千",
        million: "百万",
        billion: "十亿",
        trillion: "兆"
      },
      ordinal: function () {
        return ".";
      },
      currency: {
        symbol: "¥"
      }
    }
```



#### 局部引入

```javascript
import {Numberoll} from "Numberoll";
import "Numberoll/dist/style.css";

// 引入numeral，修改格式画样式
```



#### Props

```js
const props = defineProps({
  modelValue: { type: Number, default: 0 },
  customValue: [String, Number, Array],

  format: { type: String, default: "0,0" },
  duration: { type: String, default: "0.25s" },
  delay: String,
  easing: { type: String, default: "linear" }
});
```



#### Example

```vue
/**
* 内置numeral格式化插件，文档查看：http://numeraljs.com
*/
<numberoll v-model="num" format="0,0$" />

/**
* custom 自由度极高，可以是：
* 123*123
* 我123|33
* 你fjksdh234938
* [1,2,'我','A']
* 自己选择格式化工具，传递给Numberoll一个custom value，这样数字部分就会有滑动效果啦
*/
<numberoll :custom-value="customValue" />
```



## [Homepage ](https://breezeiii.github.io/numberoll/#/)

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