Comments (5)
You may have discovered this already, but there are some more examples in the docs now, including this Parallax one!
from motion.
I've just checked out the example and can't help feel somethings off with it, by the time you get to the 5th of the 8 images all the parallax blocks have scrolled by already. Leaving the last 3 images without any floating magic 😿 .
Or maybe that was intentional in the example?
from motion.
Thanks natemoo! Totally forgot to update here
from motion.
You may have discovered this already, but there are some more examples in the docs now, including this Parallax one!
I believe the parallax image example is broken; are the images supposed to be parallax or just the containers around them?
from motion.
Can anybody help me out with the Parallax example? I'd like to build the re-following the following scroll-behaviour: https://www.johannclausen.com/?filter=Featured.
- Fade-In title after some part of the image is shown
- On scroll, move it down, but stop after moving it 300px
I'm very new to Gatsby (React) and Framer Motion, so any help would be appreciated. I found the .tsx example but couldn't get it to work
import { Override, motionValue, useTransform } from "framer"
const contentOffsetY = motionValue(0)
// Apply this override to your scroll component
export function TrackScroll(): Override {
return { contentOffsetY: contentOffsetY }
}
// Apply this override to your parallax layer
export function ParallaxLayer(): Override {
const y = useTransform(contentOffsetY, [0, -100], [0, 50], {
clamp: false,
})
return {
y: y,
}
}
and the example mentioned above is very hard for me to understand. The structure of my div is the following:
import * as React from "react"
import { StaticImage } from "gatsby-plugin-image"
export default function Article() {
return (
<div className="entry">
<h1>Title</h1>
<StaticImage src="" />
</div>
)
}
In Vanilla JS this would be a bit easier I guess, but learning React/Gatsby, I'd rather work with those resources.
from motion.
Related Issues (20)
- [BUG] It isn't possible to animate the `x` and `y` coordinates of an SVG element using `animate` HOT 1
- [BUG] Framer Motion Animation doesn't work on reload without delay HOT 6
- [BUG] LazyMotion sets `initial` immediately; before `LazyMotion.features` load
- [BUG] with new version 11.0.24 HOT 3
- [FEATURE] Expose moved item index in Reorder.group
- ref prop does not work on div directly inside AnimatePresence with mode="popLayout" [BUG] HOT 1
- how to jump to specific position in animation sequence?
- [BUG] ScaleZ doesn't get applied to the motion component
- [BUG] problems with useMotionValue and useSpring to make an object follow the cursor after v11.
- [BUG] RotateZ not working in Shared Layout Animation HOT 2
- [BUG] v11 breaks all animations using vh and dvh as css unit HOT 1
- [BUG] v11 regression when cloning `motion` components HOT 2
- [BUG] Blinking on Enter and Exit Animations with layoutId and AnimatePresence
- [BUG] AnimatePresence - enter and exit animations are mixed when they alternate rapidly HOT 5
- [BUG] When resizing a canvas with a LayoutCamera, pointer events on meshes are aligned incorrectly.
- [BUG] Elements do not animate in latest React 19 canaries HOT 6
- [BUG] ReferenceError: React is not defined Just by importing framer-motion HOT 3
- [BUG] Docs: Application error: a client-side exception has occurred (see the browser console for more information). HOT 1
- [BUG] Property '$$typeof' is missing in `ForwardRefComponent` HOT 2
- [BUG] Next.js render error when first loaded
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from motion.