{"id":"chriscerie/roact-spring","name":"roact-spring","scope":"chriscerie","platform":"roblox","description":"A spring-physics based animation library for Roact inspired by react-spring","version":"0.1.0","latest":"0.1.0","versions":["0.0.1","0.0.2","0.0.3","0.0.4","0.0.5","0.0.6","0.0.7","0.0.8","0.0.9","0.0.10","0.0.11","0.0.12","0.0.13","0.0.14","0.0.15","0.0.16","0.0.18","0.0.19","0.0.20","0.1.0"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{"kampfkarren/roact-hooks":{"version":"^0.3.0","alias":"Hooks"},"evaera/promise":{"version":"^3.2.0","alias":"Promise"},"roblox/roact":{"version":"^1.0.0","alias":"Roact"}},"integrity":"8c0854be2f967fd842e8362031717771ee5efc24ec21fdf844023e1becb0b11d","likes":0,"downloads":0,"install":"forest install chriscerie/roact-spring","url":"https://forest.dev/p/roblox/chriscerie/roact-spring","files":"https://api.forest.dev/ai/package/roblox/chriscerie/roact-spring/files","readme":"<a href=\"https://www.chrisc.dev/roact-spring/\">\r\n  <p align=\"center\">\r\n    <img src=\"https://i.imgur.com/1Ta6WRv.png\" width=\"200\" />\r\n  </p>\r\n</a>\r\n\r\n<h1 align=\"center\">roact-spring</h1>\r\n<h3 align=\"center\">A modern spring-physics based </br> animation library for Roact inspired by react-spring</h3>\r\n\r\n<br>\r\n\r\n<div align=\"center\">\r\n  <a href=\"https://github.com/chriscerie/roact-spring/actions/workflows/docs.yml\"><img src=\"https://github.com/chriscerie/roact-spring/workflows/docs/badge.svg\" alt=\"Deploy Docs Status\"/></a>\r\n</div>\r\n\r\n<br>\r\n\r\n## Why roact-spring\r\n\r\n### Declarative and imperative\r\n`roact-spring` is the perfect bridge between declarative and imperative animations. It takes the best of both worlds and packs them into one flexible library.\r\n\r\n### Fluid, powerful, painless\r\n`roact-spring` is designed to make animations fluid, powerful, and painless to build and maintain. Animation becomes easy and approachable, and everything you do looks and feel natural by default.\r\n\r\n### Versatile\r\n`roact-spring` works with most data types and provides extensible configurations that makes it painless to create advanced animations.\r\n\r\n## Installation\r\n\r\n### Wally\r\n\r\n* Add the latest version of roact-spring to your wally.toml (e.g., `RoactSpring = \"chriscerie/roact-spring@^0.0\"`)\r\n\r\n## Getting Started\r\n\r\nGetting started with roact-spring is as simple as:\r\n\r\n### Declarative\r\n```lua\r\nlocal toggle, setToggle = hooks.useState(false)\r\nlocal styles = RoactSpring.useSpring(hooks, {\r\n    transparency = if toggle then 1 else 0,\r\n})\r\n\r\n-- Later\r\nsetToggle(function(prevState)\r\n    return not prevState\r\nend)\r\n```\r\n\r\n### Imperative\r\n\r\n```lua\r\nlocal styles, api = RoactSpring.useSpring(hooks, function()\r\n    return {\r\n        position = UDim2.fromScale(0.3, 0.3),\r\n        rotation = 0,\r\n    }\r\n})\r\n\r\n-- Later\r\napi.start({\r\n    position = UDim2.fromScale(0.5, 0.5),\r\n    rotation = 45,\r\n    config = { tension = 170, friction = 26 },\r\n})\r\n```\r\n\r\nMore information can be found in roact-spring's official [documentation](https://www.chrisc.dev/roact-spring/).\r\n\r\n## Demos\r\n\r\nThese demos are publicly available. Click on each gif to go to their source.\r\n\r\n### Draggable element\r\n\r\n<a href=\"stories/useSpringDrag.story.lua\">\r\n  <img src=\"https://media.giphy.com/media/R2bJ57MNTdP7vmP6Ez/giphy.gif\" width=\"400\" />\r\n</a>\r\n\r\n### Draggable list\r\n\r\n<a href=\"stories/useSpringsList.story.lua\">\r\n  <img src=\"https://media.giphy.com/media/4qOEZ93YjhfKtSlx7b/giphy.gif\" width=\"400\" />\r\n</a>\r\n\r\n## License\r\n\r\n`roact-spring` is available under the MIT license. See [LICENSE](LICENSE) for details.","readmeTruncated":false}