next-portfolio | personal website , blog and library demo playground | Frontend Framework library
kandi X-RAY | next-portfolio Summary
kandi X-RAY | next-portfolio Summary
next-portfolio Is my personal website, blog and library demo playground, built from scratch with Next.js.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of next-portfolio
next-portfolio Key Features
next-portfolio Examples and Code Snippets
Community Discussions
Trending Discussions on next-portfolio
QUESTION
I'm currently trying to animate a div so that it slides from bottom to top inside a card.
The useMeasure hook is supposed to give me the height of the wrapper through the handler I attached to it :
Then I am supposed to set the top offset of an absolutely positionned div to the height of its parent and update this value to animate it.
The problem is that when logging the bounds returned by the useMeasure() hook, all the values are at zero...
Here is a link to production exemple of the panel not being slided down because detected height of parent is 0 : https://next-portfolio-41pk0s1nc.vercel.app/page-projects
The card component is called Project, here is the code :
...ANSWER
Answered 2020-Nov-27 at 20:47So for people who can't get useMeasure to work with nextJS, here's my workaround :
I used a ref to get the ref.current.clientHeight of my div then create a descDivHeight variable with useState hook.
The descDivHeight value is first initialized in a useEffect hook, then value is updated through onMouseEnter/onMouseLeave.
Here's my code :
QUESTION
I'm trying to use scroll position for my animations in my web portfolio. Since this portfolio use nextJS I can't rely on the window object, plus I'm using navigation wide slider so I'm not actually scrolling in the window but in a layout component called Page.
...ANSWER
Answered 2020-Nov-19 at 23:39Cool site. We don't have complete info, but I suspect there's an issue with trying to use document.getElementsByClassName('page')[0]
. When you go to page 2, the log for scrollX
gives an HTMLCollection with 2 elements. So there's an issue with which one is being targeted. I would consider using a refs instead. Like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install next-portfolio
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page