Skip to content

Commit c3402c2

Browse files
committed
Introduction and contributing
1 parent ff5949a commit c3402c2

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,15 @@ const moveLeft = format(
4040
- [API](#api)
4141
- [spring(start, target, options)](#springstart-target-options)
4242
- [format(keyframes, formatter)](#formatkeyframes-formatter)
43+
- [Contributing](#contributing)
4344

4445
## Introduction
4546

46-
Some introductory text
47+
This library was inspired heavily by [react-motion](https://github.com/chenglou/react-motion), which allows you to create spring-based animations by repeatedly updating an elements inline styles. When animating lots of elements at the same time, this can be a burden on performance. Also, based on my own experience, integrating with some css-in-js libraries is hard.
48+
49+
This is where **css-spring** enters the stage. Enter the desired starting properties and target properties of your animation, optionally adjust the spring settings and **css-spring** generates a keyframe objects or formatted keyframe animation css for your spring-based animation of choice.
50+
51+
The library is small and easy to work with. Nevertheless, it is in the early stages of development. There is a lot of improvements to be made - read the [Contributing](#contributing) section if you want to know how you can help.
4752

4853
## Examples
4954

@@ -141,3 +146,13 @@ const keyframeCss = format(mySpring, (key, value) => {
141146
 return `${key}:${value}${key === 'left' ? 'px' : ''};`
142147
});
143148
```
149+
150+
## Contributing
151+
152+
There's a lot of ideas floating in my head that could make working with **css-spring** easier. Some of these are:
153+
154+
- allowing the interpolation of array values like margins, paddings or translates ([#1](/../../issues/1))
155+
- automatically detecting css-units and re-applying them to the interpolated values of the keyframe animation ([#2](/../../issues/2))
156+
- color interpolation ([#3](/../../issues/3))
157+
158+
Feel free to contribute with your own issues and ideas, your thoughts on the ones listed above, example documentation for usage with other css-in-js frameworks or pull requests for features/improvements you'd like to see.

0 commit comments

Comments
 (0)