Package Exports
- morfy
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (morfy) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
morfy
Fast morphing library for the web
· Homepage · View Demo · Report Bug / Request Feature ·
Table of Contents
Install
NPM:
npm install morfy
Usage
As module:
import { morph } from 'morfy';
Then:
const button = document.getElementById('test-button');
const target = document.getElementById('target');
button.addEventListener('click', () => {
morph(button, target, {
timingFunction: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)',
});
});
Docs:
/**
* Morph things
*/
function morph(source: HTMLElement, target: HTMLElement, options: MorfyOptions);
interface MorfyOptions {
/**
* duration in seconds
*/
duration: number;
/**
* css timing function
* @example 'ease-in'
*/
timingFunction: string;
/**
* css properties to copy over to target
*/
effectedCssProperties: string[];
}
Run tests
npm run test
Contact
👤 Timo Bechtel
- Website: https://timobechtel.com
- Twitter: @TimoBechtel
- GitHub: @TimoBechtel
🤝 Contributing
Contributions, issues and feature requests are welcome!
- Check issues
- Fork the Project
- Create your Feature Branch (
git checkout -b feat/AmazingFeature
) - Test your changes
npm run test
- Commit your Changes (
git commit -m 'feat: add amazingFeature'
) - Push to the Branch (
git push origin feat/AmazingFeature
) - Open a Pull Request
Commit messages
This project uses semantic-release for automated release versions. So commits in this project follow the Conventional Commits guidelines. I recommend using commitizen for automated commit messages.
Show your support
Give a ⭐️ if this project helped you!
📝 License
Distributed under the MIT License.
This README was generated with ❤️ by readme-md-generator