styled-anime
v2.0.2
Published
styled-components + animejs
Readme
styled-anime
styled-anime is simple library for create animatable styled component.
Installation
yarn add styled-anime
or
npm i styled-anime
Example
import * as React from "react";
import { render } from "react-dom";
const MovingBox = styledAnime.div`
width: 100px;
height: 100px;
background: #ddd;
`(function() {
// Write your animation code like using 'animejs, anime({ ... })'
return {
loop: true,
duration: 3000,
tarnsformX: [0, 50, 0]
};
});
const container = document.getElementById("container");
render(<MovingBox />, container);Spec
here: index.d.ts
