All Projects → hemlok → spring-keyframes

hemlok / spring-keyframes

Licence: other
✌️1.4kb library to generate css keyframes in css-in-js based on a spring algorithm, with emotion

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to spring-keyframes

Horror
😱 React HTML elements with CSS-in-JS
Stars: ✭ 78 (+20%)
Mutual labels:  emotion, css-in-js
Xstyled
A utility-first CSS-in-JS framework built for React. 💅👩‍🎤⚡️
Stars: ✭ 1,835 (+2723.08%)
Mutual labels:  emotion, css-in-js
Onno
Responsive style props for building themed design systems
Stars: ✭ 95 (+46.15%)
Mutual labels:  emotion, css-in-js
Emotion
👩‍🎤 CSS-in-JS library designed for high performance style composition
Stars: ✭ 14,177 (+21710.77%)
Mutual labels:  emotion, css-in-js
Styled Ppx
Typed styled components in Reason, OCaml and ReScript
Stars: ✭ 236 (+263.08%)
Mutual labels:  emotion, css-in-js
Flame
Component library for building Lightspeed products
Stars: ✭ 65 (+0%)
Mutual labels:  emotion, css-in-js
Vue Emotion
Seamlessly use emotion (CSS-in-JS) with Vue.js
Stars: ✭ 173 (+166.15%)
Mutual labels:  emotion, css-in-js
Facepaint
Responsive style values for css-in-js.
Stars: ✭ 523 (+704.62%)
Mutual labels:  emotion, css-in-js
Xwind
Tailwind CSS as a templating language in JS and CSS-in-JS
Stars: ✭ 249 (+283.08%)
Mutual labels:  emotion, css-in-js
Next Dark Mode
🌑 Enable dark mode for Next.js apps
Stars: ✭ 133 (+104.62%)
Mutual labels:  emotion, css-in-js
Emotion Module
💖 Emotion module for Nuxt.js
Stars: ✭ 47 (-27.69%)
Mutual labels:  emotion, css-in-js
Styled Components Vs Emotion
a short doc comparing the popular CSS-in-JS libraries styled-components and emotion
Stars: ✭ 204 (+213.85%)
Mutual labels:  emotion, css-in-js
Styled System
⬢ Style props for rapid UI development
Stars: ✭ 7,126 (+10863.08%)
Mutual labels:  emotion, css-in-js
Grid
This package has moved and renamed
Stars: ✭ 2,079 (+3098.46%)
Mutual labels:  emotion, css-in-js
Styled Tools
Useful interpolated functions for CSS-in-JS
Stars: ✭ 761 (+1070.77%)
Mutual labels:  emotion, css-in-js
Css In React
🍭 CSS in React - Learn the best CSS in JS frameworks by example
Stars: ✭ 101 (+55.38%)
Mutual labels:  emotion, css-in-js
Styled Breakpoints
Simple and powerful tool for creating breakpoints in styled components and emotion. 💅
Stars: ✭ 428 (+558.46%)
Mutual labels:  emotion, css-in-js
Design System Utils
👩‍🎨 Access your design tokens with ease
Stars: ✭ 465 (+615.38%)
Mutual labels:  emotion, css-in-js
React Next Boilerplate
🚀 A basis for reducing the configuration of your projects with nextJS, best development practices and popular libraries in the developer community.
Stars: ✭ 129 (+98.46%)
Mutual labels:  emotion, css-in-js
Goober
🥜 goober, a less than 1KB 🎉 css-in-js alternative with a familiar API
Stars: ✭ 2,317 (+3464.62%)
Mutual labels:  emotion, css-in-js

alt text

Generate css keyframes in css-in-js based on a spring algorithm, with emotion: https://github.com/emotion-js/emotion.

Spring transform properties: transformX, transformY, scale3d, as x, y, and scale, as well as opacity.

  • The default export is wrapped in emotion's keyframes, however you can also export { spring } which returns an array you can join and use with other css-in-js solutions. (I think...)

Note: for scale, be sure to use a higher precision, like 4.

Example

This example is done for a react app, but can easily work without react with emotion

import spring from 'spring-keyframes'
import styled from 'react-emotion'

const options = {
  stiffness: 80,
  damping: 50,
  precision: 4,
  unit: 'px',
}

const Component = styled.div`
  animation: ${spring({
    from: {
      opacity: 0,
      x: 0,
      scale: 0
    },
    to: {
      opacity: 1,
      x: 100,
      scale: 1
    }
  }, options)} 300ms;
  animation-fill-mode: both;
`
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].