921 questions
0
votes
0
answers
37
views
Apply Framer Motion animation to child via wrapper (like Radix UI’s asChild)
I have created an animation wrapper:
export function StaggerBlurElement({
children,
blur = 10,
...
0
votes
0
answers
134
views
Next.js + Framer Motion page transition: new page appears at old scroll position before jumping to top
Context / goal:
I’m building a Next.js project with Framer Motion for page transitions. The old page should slide out from its current scroll position, and the new page should slide in starting at ...
0
votes
0
answers
42
views
Framer-motion filter animation not working
I have code like below (showing project list and filter button)
const Projects = ({ loaderData }: Route.ComponentProps) => {
const [selectedCategory, setSelectedCategory] = useState('All')
...
0
votes
0
answers
79
views
How to create a vertical infinite animation in Framer Motion with a mask that changes div content when passing through it?
How to create a vertical infinite animation in Framer Motion with a mask that changes div content when passing through it?
I want to implement an animation in React + TailwindCSS + Framer Motion that ...
0
votes
1
answer
62
views
My Exit variant in framer motion is not working
I'm using BrowserRoute of react-router and I specify my routes like this with MainLayout contains Navbar and Outlet. There is a Stairs component with animation effects wrapping up my Home and Contact ...
3
votes
1
answer
154
views
How to prevent re-renders of a static child?
I'm building a collapsible sidebar in React with Framer Motion, and am struggling to keep a static prop from re-rendering.
More specifically, I create sidebar buttons with a SidebarItem.tsx component. ...
0
votes
0
answers
50
views
Button animation: text gets cut off
I'm trying to create an interactive hover button using Motion that:
Shows idleText by default with a white background
On hover, reveals hoverText while animating the white background away using ...
0
votes
0
answers
76
views
How to animate character exit without breaking container layout animation?
I'm building a React component that rotates through words, animating them character by character using Framer Motion.
My goal:
The background container should resize smoothly to match the new word (...
0
votes
1
answer
49
views
React Animation Component Pauses When Custom Cursor Moves - Performance Interference Issue
I'm experiencing a performance issue where a React animation component stops working properly when a custom cursor moves around the page. The two animations seem to interfere with each other.
I have ...
0
votes
0
answers
121
views
Failing to compile my Next js project with Typescript & Tailwind
The npm run dev mode works fine, but I am getting a failed to compile error during the build process due to the below code snippet.
These are the scripts, dependicies and dev dependicies in the ...
0
votes
0
answers
38
views
LayoutTransition react issue
I am writing a web application in react-with-typescript:
I use index.tsx as a layout component, I need to somehow delay the transition between pages so that the animation of filling the screen can ...
1
vote
1
answer
102
views
Flutter Animate Widget Transition
Need help with simulating transition of widgets from one location to another. The new location is the location of another widget.
If anyone is familiar with Framer Motion's layoutid, it's similar to ...
2
votes
2
answers
61
views
Can we use useTransform() inside JSX (like inside a <p> tag)?
While watching a YouTube tutorial by web animations expert Olivier Larose, I noticed something unusual and potentially against the conventional rules of React hooks.
In the video, it appears that he's ...
0
votes
1
answer
79
views
Error: window is not defined using Framer Motion with NextJs
import Poster from '@/components/poster';
import { motion, useScroll, useTransform } from 'framer-motion';
import { StaticImageData } from 'next/image';
import React, { useRef } from 'react';
type ...
1
vote
1
answer
1k
views
How to create infinite scrolling carousel in React with Framer Motion?
I'm trying to create an infinite scrolling horizontal carousel of icons using React and Framer Motion. The animation works, but I'm encountering issues with visible empty space at the end of the ...
0
votes
1
answer
79
views
Framer Motion whileInView animation not triggering inside a div with overflow-hidden
I'm using Framer Motion with React and trying to animate an <h1> element sliding into view from the left, inside a div that has overflow-hidden. My goal is to make the text look like it's "...
1
vote
2
answers
114
views
How to derive element type from motion component (m.div -> HTMLDivElement)?
Given a motion component, such as m.div is it possible to derive HTMLDivElement? Or, HTMLButtonElement from m.button, etc?
Perhaps a type utility that could do something like this?
type HTMLType = ...
0
votes
1
answer
196
views
How to scale a card/image in React + Framer Motion without layout shift or key errors
As provided in the code shown below, I am trying to scale a Portrait component to come to the front from its own position and at the same time keep that normal portrait in its position.
Whenever I do ...
1
vote
1
answer
227
views
How to trigger Magic UI (Framer Motion-based) animations only when entering the viewport, not when the mobile URL bar shows/hides?
I'm working with a React/Next.js 15 project using Framer Motion to animate text components. I've created a custom <TextAnimate /> component that mimics the behavior of Magic UI's text animations ...
1
vote
0
answers
68
views
(Framer) Motion `textarea` height animation causes first line to flicker (shift up) briefly
I'm using (Framer) Motion to animate the height of a textarea in React. It starts with one row and automatically expands when the user types past the first line. But there's a visual bug:
When the ...
0
votes
0
answers
103
views
Motion: AnimatePresence not working for modal with createPortal
I was trying to integrate framer-motion (aka. motion) in my platform. I have a useModal hook which is created to simplify working with modals. It was already created and I was intergating the ...
0
votes
0
answers
48
views
Calculating offset to center a card in a carousel
I'm working on this React x Motion carousel that brings a card to the center of the screen when it has been clicked, depending on its index. However, the cards only seem to be placed at the start of ...
0
votes
1
answer
101
views
Framer motion skips animating a specific property
I am not able to animate the y property but the text animates opacity property .
How to animate both y and opacity properties . Both Y and opacity animate only for the first letter in string . I want ...
0
votes
1
answer
185
views
Using Framer Motion add class to div after scrolling fully past it
I have an element that becomes visible when it enters the viewport, with scroll animated child elements, I need for it to stay visible after scrolling past, with the animations done after, but ...
0
votes
2
answers
108
views
Why is the second character missing and an undefined character added in my typing effect? [duplicate]
I'm working on a simple typing effect component in React using Framer Motion. Here's the code for my TypingText component
TypingText.jsx
import { motion } from 'framer-motion';
import React, { ...
0
votes
0
answers
68
views
Chakra-ui/react Tauri Vite - Cannot initialise app after build (uncaught type error extendStatics is not a function)
Had this issue for a while where I can build to completion but initialisation leads to the following error:
react-BqWMAaNf.js:1228 Uncaught TypeError: extendStatics is not a function
at __extends ...
1
vote
2
answers
55
views
motion.div horizontal bar animation has a visible reset
I'm trying to make a horizontal bar that has an animation of scrolling forever from right to left, but the problem is that when the animation is over, you can visually see the reset, and it's really ...
0
votes
0
answers
117
views
Scrolling posts animation in React using TailwindCSS and Framer Motion like Ultra
I'm trying to create a scrolling posts animation in React using TailwindCSS and Framer Motion similar to this example link?
I tried to implement it this way, but it doesn’t work and doesn’t look as ...
0
votes
0
answers
57
views
Snap drag to center on motion react
I'm relatively new to motion, and I'm making this carousel that you scroll on drag. However the only issue is that the elements don't snap at the center when I drag.
Here's the code
import { useRef } ...
1
vote
0
answers
129
views
useMotionValueEvent not working on motion react
I just discovered motion for react (previously framer motion) and I just started learning it. I've gotten a hold of the basic syntax from the docs to make some simple animations. I'm working with ...
0
votes
0
answers
37
views
Working with framer-motion, getting the image size
I am trying to use framer-motion in a Next/React app, starting with some working examples.
But it is a bit hard to see what is going on, in some cases and know how to access some pieces of information....
0
votes
0
answers
103
views
Animate When In View, Once
I have a path I wish to animate:
<motion.path
initial={{ pathLength: 0 }}
transition={{ duration: 5, ease: 'easeInOut' }}
whileInView={{ pathLength: 1 }}
viewport={{ once: ...
0
votes
0
answers
21
views
Setting exit to string makes the animation disappear framer
Setting exit="visible" makes the ul and li animations disappear.
Setting it to exit={{ opacity: 1, scale: 1 }} makes the exit animation before the component leaves the DOM to never end.
[...
0
votes
0
answers
56
views
How to Make a Scroll-Based Framer Motion Animation Work Across All Desktop Resolutions?
I have a scroll-based animation in a React component using Framer Motion. It animates a set of cards (motion.div) as the user scrolls down. However, the issue I'm facing is that on certain desktop ...
0
votes
0
answers
91
views
Issue with replicating an apple-watch-grid view component (framer motion pro)
Goal:
I am trying to create an apple-watch-grid-view type component inspired by this example
Tech used
I am using ReactTS(vite) + framer-motion to achieve this
Current Progress and Problem
I have ...
0
votes
0
answers
30
views
Spring motion after scrolling to the section
I want to achieve the following behavior when clicking on a nav link in my header:
Scroll smoothly to the corresponding section.
Apply a spring animation to the section with stiffness=100,
damping=15,...
1
vote
1
answer
257
views
Framer [Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined
After installing framer motion and applying some animations to my NextJS component, I get error,
[Error: Element type is invalid: expected a string (for built-in components) or a class/function (for ...
0
votes
0
answers
74
views
useScroll + useSpring = refresh issue with React Motion
When using useScroll and useSpring in Motion.
If you have some scroll progress then, on page refresh :
The animation restarts and animate progressively to match scroll value,
instead of directly be on ...
1
vote
0
answers
73
views
NEXT JS Static Website Unhandled Runtime Error: Error: Failed to load chunk static/chunks/node_modules_85ff16._.js from module
I checked a similar Q&A on the forums but could not find the answer I was looking for. I am developing a static website with NextJS, Framer Motion, Tailwind, and SCSS. Everything was fine until I ...
0
votes
1
answer
207
views
How to animate a React Three Fiber "group" object with NEW framer motion?
I am building a 3D website with different pages. I am trying to make "prior" sections disappear when advancing to "further" ones by setting their y-position to -5 when not on that ...
-2
votes
1
answer
130
views
How do you animate an SVG Transform string with framer-motion
I'm having trouble animating the SVG Transform string using framer-motion. I tried animating it in the usual (manual) way
import { type FC, useRef, useEffect } from "react"
import { animate }...
1
vote
1
answer
113
views
Next JS - motion whileInView is not being triggered on soft navigation
I'm making a portfolio site using Next JS and motion, for the projects section I'm animating project cards using whileInView. it is working fine but when I do soft navigation and move to the more ...
2
votes
2
answers
266
views
How to design rotating cube with text and image changing Hero section in Next.JS , Tailwind CSS and Framer Motion?
I am trying to re-create the string-sytems.co.uk (or you can see the GIF below) to learn the concepts of Next.js, Tailwind CSS, and Framer Motion.
I'm new to all these things and need to design the ...
0
votes
1
answer
101
views
How to add a delay to an animation if it's in the viewport initially, otherwise have a different delay?
I'm trying to build a website using React and framer motion and I'm running into a challenge.
If an element is in the viewport when the page initially loads, I want there to be a delay on the ...
0
votes
0
answers
49
views
Wait for all FramerMotion LayoutGroup animations to complete
I have a fairly complex page that contains several nested layers of React components inside a Framer Motion <LayoutGroup>, containing a large number of leaf <motion.div> instances. What I ...
1
vote
1
answer
241
views
Motion not recognizing global.css variables
I am trying to animate some things using Motion (previously Framer Motion) for React (19) in a NextJS 15 project.
The problem is, that I cannot apply the colors defined in the global.css file in ...
0
votes
0
answers
18
views
Initial Position of Elements based on Screen Size (Framer)
On desktop I have text which floats in from an X axis, it is out of view until you scroll to it. On mobile I intend to change this to be a small "bump" on the Y axis.
I have tried multiple ...
0
votes
0
answers
15
views
MotionFramer - How to properly use scale with layoutId?
I’m working on a "Hero-style" animation and could use some advice. I have a card on my body that I want to "move up" into a modal, and I’d like to move the card and scale it up at ...
0
votes
0
answers
17
views
How to optimize Image Reveal function component?
I am trying to optimize the hover function on the card to show the illustration image. But I am having some problems, hovering on each element will send a request to download the image. However, the ...
0
votes
0
answers
42
views
Cannot snap div in two places with Framer-Motion drag functionality
I created a sandbox for easy testing: https://codesandbox.io/p/sandbox/gj6x26
The issue I’m facing is that I can’t make the drawer snap to two positions.
I want the drawer to snap at the bottom, ...