# @sygnas/vue-interval-loop

> ## Description カウントループするだけの Vue Single file component です。

Latest version **1.0.0** (published 2020-02-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @sygnas/vue-interval-loop
pnpm add @sygnas/vue-interval-loop
yarn add @sygnas/vue-interval-loop
bun add @sygnas/vue-interval-loop
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-02-15 |
| First published | 2020-02-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=8 |
| Dependencies | 0 |
| Unpacked size | 17 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Hiroshi Fukuda |
| Maintainers | sygnas |
| Keywords | vue, loop, count |

## Links

- npm: https://www.npmjs.com/package/@sygnas/vue-interval-loop
- Repository: https://github.com/sygnas/syg-vue-interval-loop
- Homepage: https://github.com/sygnas/syg-vue-interval-loop#readme
- Issues: https://github.com/sygnas/syg-vue-interval-loop/issues
- npm.io page: https://npm.io/package/@sygnas/vue-interval-loop

## Recent versions

- 1.0.0 (latest) — 2020-02-15

## README

# syg-vue-interval

## Description
カウントループするだけの Vue Single file component です。

画像の無限フェードインを作りたかったのですが、画像だけでなくブロック要素ごと切り替える必要があったので、汎用性のある本コンポーネントを作成しました。

## Release

- 2020.02.15
  - とりあえず公開

## Usage

### Install

```sh
npm install --save @sygnas/vue-interval-loop
```

### html / JS

```html
<div id="app">
  <vue-interval-loop v-slot:default="slotProps">
    <p v-if="slotProps.now === 0">This is 0.</p>
    <p v-else-if="slotProps.now === 1">This is 1.</p>
    <p v-else>This is other {{slotProps.now}}.</p>
  </vue-interval-loop>
</div>
```

`slotProps.now` を利用して`<transition>`を使えばフェードインなど応用できます。

```javascript
import Vue from 'vue';
import vueIntervalLoop from '@sygnas/vue-interval-loop';

  new Vue({
    el: '#app',
    components: {
      vueIntervalLoop,
    },
  });
```

### Options

`<vue-interval-loop>`の属性。

| 属性 | 初期値 | 説明 |
| --- | --- | --- |
| max | 3 | カウントする最大値。0〜(max - 1)までカウントする |
| start | 0 | カウントの最初の値 |
| delay | 1000 | カウントアップの間隔。ミリ秒 |

## License
MIT

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