1.0.7 • Published 4 years ago

vue-tsx-keyframes v1.0.7

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

CircleCI MIT License npm version

vue-tsx-keyframes

library of keyframes as CSS in JS with using vue-tsx-support

Usage

Create vue-cli project, and install vue-tsx-support

Install from npm:

yarn add -D vue-tsx-keyframes # npm install --save-dev vue-tsx-keyframes

In your .tsx file, add @keyframes enclosed backquote

data() {
  return {
    horizontalFrame: `
      @keyframes horizontal {
        0% {
          transform:translateX(-8px);
        }
        100% {
          transform:translateX(8px);
        }
      }
    `
  };
}

Import vue-tsx-keyframes

import keyframes from "vue-tsx-keyframes";

Add keyframes in mounted()

mounted() {
  keyframes(this.horizontalFrame);
}

Sample : https://github.com/shuta13/vue-tsx-sample/blob/master/src/components/CssInJs.tsx

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago