{"id":18626851,"url":"https://github.com/adamseckel/spring-keyframes","last_synced_at":"2025-04-11T05:31:18.408Z","repository":{"id":30393933,"uuid":"124777436","full_name":"adamseckel/spring-keyframes","owner":"adamseckel","description":"✌️1.4kb library to generate css keyframes in css-in-js based on a spring algorithm, with emotion","archived":false,"fork":false,"pushed_at":"2022-12-09T02:04:54.000Z","size":2256,"stargazers_count":67,"open_issues_count":13,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-04T20:04:09.388Z","etag":null,"topics":["animation","css","css-in-js","emotion","react"],"latest_commit_sha":null,"homepage":"https://spring-keyframes.hemlok.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adamseckel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-11T16:45:28.000Z","updated_at":"2024-03-11T03:19:17.000Z","dependencies_parsed_at":"2023-01-14T17:00:39.639Z","dependency_job_id":null,"html_url":"https://github.com/adamseckel/spring-keyframes","commit_stats":null,"previous_names":["hemlok/spring-keyframes"],"tags_count":52,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamseckel%2Fspring-keyframes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamseckel%2Fspring-keyframes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamseckel%2Fspring-keyframes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamseckel%2Fspring-keyframes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamseckel","download_url":"https://codeload.github.com/adamseckel/spring-keyframes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223460153,"owners_count":17148734,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animation","css","css-in-js","emotion","react"],"created_at":"2024-11-07T04:39:19.465Z","updated_at":"2024-11-07T04:39:19.918Z","avatar_url":"https://github.com/adamseckel.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cimg src=\"https://user-images.githubusercontent.com/9043345/41439555-26f827f0-7023-11e8-91e0-6396c9e3cd25.gif\" alt=\"alt text\" width=\"100%\"\u003e\n\n#### Generate css keyframes in css-in-js based on a spring algorithm, with emotion: https://github.com/emotion-js/emotion.\n\nSpring transform properties: `transformX`, `transformY`, `scale3d`, as `x`, `y`, and `scale`, as well as `opacity`.\n\n- 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...)\n\nNote: for scale, be sure to use a higher precision, like 4.\n\n### Example\n\nThis example is done for a react app, but can easily work without react with `emotion`\n\n```\nimport spring from 'spring-keyframes'\nimport styled from 'react-emotion'\n\nconst options = {\n  stiffness: 80,\n  damping: 50,\n  precision: 4,\n  unit: 'px',\n}\n\nconst Component = styled.div`\n  animation: ${spring({\n    from: {\n      opacity: 0,\n      x: 0,\n      scale: 0\n    },\n    to: {\n      opacity: 1,\n      x: 100,\n      scale: 1\n    }\n  }, options)} 300ms;\n  animation-fill-mode: both;\n`\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamseckel%2Fspring-keyframes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamseckel%2Fspring-keyframes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamseckel%2Fspring-keyframes/lists"}