티스토리 뷰
반응형
[nextjs/framer] framer를 이용한 nextjs에서 애니메이션 적용
Framer — The internet is your canvas
Framer is where teams design and publish stunning sites.
www.framer.com
https://stackademic.com/blog/next-js-13-framer-motion-page-transitions
Next.js 13 + Framer Motion Page Transitions
How to add a simple slide-in animation to all our pages using Next.js framework and Framer Motion.
stackademic.com
#framer-motion 설치
npm install framer-motion
#app/template.tsx
"use client"
import { motion } from "framer-motion"
const variants = {
hidden: { opacity: 0, x: -200, y: 0 },
enter: { opacity: 1, x: 0, y: 0 },
}
export default function Template({ children }: { children: React.ReactNode }) {
return (
<motion.main
variants={variants}
initial="hidden"
animate="enter"
transition={{ type: "linear" }}
>
{children}
</motion.main>
)
}
#motion #framer #tsx #typescript #nextjs
반응형
'라이브러리(library)' 카테고리의 다른 글
[autohotkey/매크로]키보드 마우스 매크로 구현 (0) | 2024.03.05 |
---|---|
아카라 API refreshToken을 이용한 accessToeken 관리 (0) | 2024.01.31 |
[node/javascript/필립스 휴] node 환경에서 휴 조명 컨트롤하기 (0) | 2024.01.02 |
[1분 해결] ffmpeg 동적으로 인코딩하기 (0) | 2021.10.27 |
댓글
반응형