GithubHelp home page GithubHelp logo

bettaibi / framer-motion-knowledge-sharing Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 219 KB

Home Page: https://6387cf052a516c00093205a0--velvety-zuccutto-d6d247.netlify.app/

HTML 6.47% TypeScript 91.49% SCSS 2.04%

framer-motion-knowledge-sharing's Introduction

Animations

How do animations add impact to websites?

  • They Can Improve Engagement and Conversion.
  • It makes us be able to tell stories and communicate emotions and ideas in a unique, easy-to-perceive way that everyone could understand.
  • They help users navigate the app by understanding the connections between various interface elements.
  • Web animation can be used to attract attention, engage people better, and communicate more clearly and effectively.

But, be careful, Animations everywhere could affect on App performance.

Framer motion For React - Basics

  1. Simple Animation

  2. Exit Animation

    • to perform an exit animation, element should be wrapped between AnimationPresence
  3. variants

    • Setting animation as an object
  4. keyframes

    • Values in animate can also be set as a series of keyframes. This will animate through each value in sequence.
          animate={{
            scale: [1, 2, 2, 1, 1],
            rotate: [0, 0, 270, 270, 0],
            borderRadius: ["20%", "20%", "50%", "50%", "20%"],
        }}
  5. Gestures

    • Framer Motion has shortcuts for animating to a set of values when gestures start, like hover, tap, drag, focus and inView.
  6. Drag

    • A component can be made draggable with the addition of the drag prop. Lock it to either axis by setting drag to "x" or "y".
  7. Manual controls

    • Framer motion provides useAnimation hook can be used to manually start/stop animations, and compose them together.
  8. MotionValues

    • Motion uses MotionValues to track the state and velocity of every animating value.
  9. Layouts

    • CSS layouts are difficult and expensive to animate. Sometimes it doesn't even make sense. What does it actually mean to animate justify-content between flex-start and flex-end?
  • clientWidth is the inner width (ie. the space inside an element including padding but excluding borders and scrollbars)

  • offsetWidth is the outer width (ie. the space occupied by the element, including padding and borders)

  • scrollWidth is the total width including stuff that is only visible if you scroll

framer-motion-knowledge-sharing's People

Contributors

b-nidhal avatar bettaibi avatar

Watchers

 avatar

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.