项目
在 GitHub 查看
LegendApp/legend-motion
关于
Legend Motion 是一个用于 React Native 的声明式动画库,让你无需管理动画即可轻松实现样式过渡。
网站与应用开发可以做什么
- ✨ Supports react-native and react-native-web
- ✨ API similar to Framer Motion for easy mixing of React Native with React
- ✨ Supports animating SVG and linear gradient
- ✨ Supports transformOrigin
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- +1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Legend-Motion
Legend-Motion is a declarative animations library for React Native, to make it easy to transition between styles without needing to manage animations.
npm install @legendapp/motion or yarn add @legendapp/motion
import { Motion } from "@legendapp/motion"
<Motion.View
initial={{ y: -50 }}
animate={{ x: value * 100, y: 0 }}
whileHover={{ scale: 1.2 }}
whileTap={{ y: 20 }}
transition={{ type: 'spring' }}
/>
Highlights
- ✨ Supports react-native and react-native-web
- ✨ API similar to Framer Motion for easy mixing of React Native with React
- ✨ Supports animating SVG and linear gradient
- ✨ Supports transformOrigin
- ✨ whileHover and whileTap for easy animations on touch
- ✨ AnimatePresence for exit animations
- ✨ 0 dependencies using the built-in Animated
- ✨ Built for maximum performance
- ✨ Strongly typed with TypeScript
📖 Docs
The full documentation with live examples is on our website.
Upgrading from 1.x
whileTapandwhileHoverprops now require aMotion.Pressableancestor, which it uses for tracking whether it's hovered or pressed. See the example.
👩⚖️ License
Legend-Motion is created and maintained by Jay Meistrich with Legend and Bravely.
探索相关项目
加载中…


