Giter Site home page Giter Site logo

troef-photo's Introduction

Wedding Photographer Portfolio

Tutorials I am using:

Smooth Loading Transitions with Framer Motion. AnimateSharedLayout

Things I learn about:

  • Images:

  • All images are living in the public folder. They are .webp images which come with fallbacks ( -jpg format) for lame browsers who don't support .webp formats - the former are half the size of jpg

  • WebP is a modern image format that provides superior lossless and lossy compression for images on the web.

  • CSS:

  • white-space: nowrap; the text will never wrap to the next line

  1. AnimateSharedLayout component enables to perform layout animations between different components that share the same layoutId. By adding type="crossfade" to AnimateSharedLayout, immediate children of AnimatePresence will crossfade with their old component, smoothing this transition.
  2. Variants - can be used to animate entire sub-trees of components with a single animate prop. Do not forget to wrap your html element which you want to animate with {motion} word:
        const list = { hidden: { opacity: 0 } }
        const item = { hidden: { x: -10, opacity: 0 } }
    
        return (
        <motion.ul animate="hidden" variants={list}>
            <motion.li variants={item} />
            <motion.li variants={item} />
            <motion.li variants={item} />
        </motion.ul>
        )
    
  3. framer-motion animation consists of three main attributes: 'initial' - Before the component has mounted

'animate' - As the component is mounting/mounted

'exit' - When the component unmounts (Requires Animate Presence)

  1. Animate Presence component animates components when they're removed from the React tree. It's required to enable exit animations with this component. Usage: Wrap one or more motion components with AnimatePresence. This enables the use of an exit prop, which can define a state for the component to animate to before it's unmounted from the DOM.

Detection of elements in viewport & smooth scrolling with parallax effects.

troef-photo's People

Contributors

magdasokolovic avatar yankhanafi avatar imgbotapp 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.