GithubHelp home page GithubHelp logo

ashutosh1919 / react-liquidswipe Goto Github PK

View Code? Open in Web Editor NEW
395.0 10.0 69.0 26.95 MB

๐Ÿš€ Smooth Liquid Swipe Animation to transition between different components.

Home Page: https://liquidswipe.netlify.app

License: MIT License

JavaScript 95.67% CSS 4.33%
liquidswipe reactjs animation react-use-gesture react-liquidswipe react-liquid-swipe react-animation-library animation-css animation-library gatsbyjs

react-liquidswipe's Introduction

๐Ÿš€ React LiquidSwipe

Very smooth component transition animation with liquid swipe effect.

NodeJS NPM Made With Gatsby code style: prettier
Netlify Status Build Status License Maintenance Website License Price

Loved the project? Please consider donating to help it improve!

If you want to discuss about something, then you can ask on my Discord Server.

โญ Star us on GitHub โ€” it helps!
To view a live example, click here

React LiquidSwipe is created using physics based animation libraries react-spring and react-use-gesture.

Use in your website โœ๏ธ

Liquid swipe effect is created considering reusability in mind. As of now, there is no npm or yarn package that you can install because there are several major issues with this package and they are mentioned in the later section of this file. Once, those errors are addressed, we can wrap the component as npm or yarn package.

If you want to use this animation in your website, you can clone the repository and you can copy the file src/components/liquidswipe.js in your project.

To use the component, your code should look like below.

import { LiquidSwipe } from '<relative-path-of-liquidswipe.js>';
...
export const YourComponent = () => {
    var componentsToRender = [] // Add components you want to render.
    var backgroundColors = [] // Add background colors for each component.
    ...
    return (
        ...
        <LiquidSwipe
            components={componentsToRender}
            colors={backgroundColors}
        />
        ...
    );
}

As of now, the mass and tension of the animation drag is constant and is defined in liquidswipe.js file but it may be a changeable parameter in the future version.

If you think that this documentation is not enough for you to understand, I have given other resources links in the Important Links section.

Technologies Used ๐Ÿ› ๏ธ

3D Clay Device Illustrations ๐Ÿฅ

Important Links ๐Ÿ“‘

Caution โ˜ ๏ธ

This project is still under development and has many issues with it. We have only achieved animation. We need to handle the side effects which it has generated. So, I would humbly suggest you not to use this animation in below cases.

  • The animation uses dynamic rendering. So, globally rendered background colors by any theming library (styled-components, emotion, theme-ui) will not work. You can use theming libraries for all purposes other than changing colors.
  • Currently it is not working in mobile and tablet screens since click is not available and tap animation code has to be added.

If you think you can solve any of the above problems then we will highly appreciate you to raise the pull request.

License ๐Ÿ“„

This project is licensed under the MIT License - see the LICENSE.md file for details. You can use this project for personal as well as commercial purposes. But if you think you have modified the project and built something really good, we will humbly request you to raise the pull request and share with the opensource community.

Contributing ๐Ÿ’ก

If you can help us with these. Please don't hesitate to open an pull request or issue. If you want to know about how to create pull request, then please refer to this blog.

I have mentioned issues with the current implementation in the Caution section. We are highly appreciating you to raise the pull request to resolve some/all the issues.

Donate ๐Ÿ’‰

I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously, this takes time. You can use this project for personal and commercial purpose for free.

However, if you are using this project and happy with it or just want to encourage me to continue creating stuff, there are few ways you can do it :-

  • Giving proper credit when you use this on your project, linking back to it :D
  • Starring and sharing the project ๐Ÿš€
  • You can make one-time donations by clicking the buttons below. I'll probably buy an amazing workstation which will help me build more aggressively.

paypal Buy Me A Coffee

Contributors โœจ

Thanks goes to these wonderful people (emoji key):


Ashutosh Hathidara

๐Ÿ’ป ๐Ÿ“– ๐ŸŽจ ๐Ÿค” ๐Ÿšง

Andre Rodrigues Lima

๐Ÿ’ป

This project follows the all-contributors specification. Contributions of any kind welcome!

References ๐Ÿ‘๐Ÿป

react-liquidswipe's People

Contributors

allcontributors[bot] avatar andre2553 avatar ashutosh1919 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-liquidswipe's Issues

Add Scroll Events

  • Allowing the components to switch on scroll makes a lot of sense in desktops/laptops.
  • Also, it will also be better if the components are switched when the user clicks on the button.
  • Can you also make the pages swipe both ways?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.