# vue-animate-component

> via yarn:

Latest version **1.0.3** (published 2020-03-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install vue-animate-component
pnpm add vue-animate-component
yarn add vue-animate-component
bun add vue-animate-component
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2020-03-14 |
| First published | 2020-03-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | shundroid |
| Maintainers | shundroid |

## Links

- npm: https://www.npmjs.com/package/vue-animate-component
- npm.io page: https://npm.io/package/vue-animate-component

## Dependencies (1)

- [vue](https://npm.io/package/vue.md) ^2.6.11

## Recent versions

- 1.0.3 (latest) — 2020-03-14
- 1.0.2 — 2020-03-14
- 1.0.1 — 2020-03-14
- 1.0.0 — 2020-03-14

## README

# vue-animation-component

## Setup

via yarn:   

```bash
$ yarn add vue-animate-component
```

via npm:  

```bash
$ npm i --save vue-animate-component
```

## Example

Props are based on [Keyframe Formats](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API/Keyframe_Formats) and [EffectTiming](https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming).  
You can control the start timing of the animation by setting `v-model` attribute.

```html
<template>
  <div id="app">
    <div id="rect">
      <animation v-model="active" :duration="1000" easing="ease">
        <keyframe transform="translate(0, 0)" :offset="0" />
        <keyframe transform="translate(100px, 0)" :offset="0.25" />
        <keyframe transform="translate(50px, 0)" :offset="0.5" />
        <keyframe transform="translate(120px, 0)" :offset="1" />
      </animation>
    </div>
    {{ active ? 'Animating' : 'Stopping' }}
    <button @click="active = !active">Toggle</button>
  </div>
</template>

<script>
import { Animation, Keyframe } from 'vue-animate-component'
export default {
  components: {
    Animation,
    Keyframe
  },
  data() {
    return {
      active: false
    }
  }
}
</script>

<style>
#rect {
  width: 100px;
  height: 100px;
  background-color: red;
}
</style>
```

## Author

shundroid

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