jss-keyframes
v0.1.0
Published
Helper for generating keyframes with a unique id in jss
Downloads
1,274
Readme
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
}