Skip to content

Commit 08d8951

Browse files
authored
feat(ui): add framer-motion page transitions via template.tsx (JhaSourav07#99)
**Fixes JhaSourav07#92** **Pillar** 🛠️ Other (Bug fix, refactoring, docs) **Visual Preview** Tested locally, the fade + slide transition works when going from / to /[username] and back. Feels smooth! I did not take a screen record , but if needed inform me and I will add it. Checklist before requesting a review: - [x] I have read the CONTRIBUTING.md file. - [x] I have tested these changes locally. - [x] I have run npm run format and npm run lint locally and resolved all errors. - [x] My commits follow the Conventional Commits format. - [x] I have starred the repo. - [x] I have made sure that I have only one commit in this PR. I'm fairly new to open source and this is my first GSSoC contribution. Took some AI help to understand the approach but made sure I understood what I was doing. Let me know if anything needs fixing!
2 parents 6c0c61d + aff40b2 commit 08d8951

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

app/template.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'use client';
2+
3+
import { motion } from 'framer-motion';
4+
5+
export default function Template({ children }: { children: React.ReactNode }) {
6+
return (
7+
<motion.div
8+
initial={{ opacity: 0, y: 8 }}
9+
animate={{ opacity: 1, y: 0 }}
10+
exit={{ opacity: 0, y: -8 }}
11+
transition={{ duration: 0.3, ease: 'easeInOut' }}
12+
>
13+
{children}
14+
</motion.div>
15+
);
16+
}

0 commit comments

Comments
 (0)