0.1.0 • Published 6 years ago

jss-keyframes v0.1.0

Weekly downloads
1,028
License
MIT
Repository
github
Last release
6 years ago

jss-keyframes

Helper for generating keyframes with a unique id in jss

Installation

yarn add jss-keyframes

Usage

import keyframes from 'jss-keyframes';

const animationName = keyframes({
  from: { transform: 'scale(1)' },
  to: { transform: 'scale(0)' },
});

The keyframes function return the name of the animation.

Options

The keyframes function accepts a second object for some options.

type Options = {
  // Jss instance to be used
  // It will generate a separate stylesheet for every instance
  jss: Jss
  // A name to better identify the animation
  // Example: { name: 'button' } would return button-1
  // This option will default to animation 
  name: string
}