0.0.11 • Published 9 months ago
@humanspeak/svelte-motion v0.0.11
@humanspeak/svelte-motion
Why are we here?
Just a little wrapper for motion. I love their work! The typical this is a WIP, if you have issues please give me a react example working so that I can work to ensure its running properly 😍
Supported Elements
Regular Elements
motion.amotion.articlemotion.asidemotion.blockquotemotion.buttonmotion.codemotion.ddmotion.divmotion.dlmotion.dtmotion.fieldsetmotion.figcaptionmotion.figuremotion.footermotion.formmotion.h1motion.h2motion.h3motion.h4motion.h5motion.h6motion.headermotion.labelmotion.legendmotion.limotion.mainmotion.navmotion.olmotion.optionmotion.pmotion.premotion.sectionmotion.selectmotion.spanmotion.tablemotion.tbodymotion.tdmotion.textareamotion.tfootmotion.thmotion.theadmotion.trmotion.ul
Void Elements
motion.areamotion.basemotion.brmotion.colmotion.embedmotion.hrmotion.imgmotion.inputmotion.parammotion.sourcemotion.trackmotion.wbr
Configuration
MotionConfig
This package includes support for MotionConfig, which allows you to set default motion settings for all child components. See the Reach - Motion Config for more details.
<MotionConfig transition={{ duration: 0.5 }}>
<!-- All motion components inside will inherit these settings -->
<motion.div animate={{ scale: 1.2 }}>Inherits 0.5s duration</motion.div>
</MotionConfig>Current Limitations
Some Motion features are not yet implemented:
reducedMotionsettingsfeaturesconfiguration- Performance optimizations like
transformPagePoint - Advanced transition controls
We're actively working on adding these features. Check our GitHub issues for progress updates or to contribute.
External Dependencies
This package carefully selects its dependencies to provide a robust and maintainable solution:
Core Dependencies
- motion
- High-performance animation library for the web
- Provides smooth, hardware-accelerated animations
- Supports spring physics and custom easing
- Used for creating fluid motion and transitions
Examples
| Motion | REPL |
|---|---|
| React - Enter Animation | View Example |
| Random - Shiny Button by @verse_ | View Example |
License
MIT © Humanspeak, Inc.
Credits
Made with ♥ by Humanspeak