From 320b3346705ab33ed7d2ca798efbe4d9bcc7735a Mon Sep 17 00:00:00 2001 From: nitin mohan Date: Sat, 27 Jun 2026 13:02:05 +0530 Subject: [PATCH] Add smooth page transitions and navigation animations --- app/template.tsx | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 app/template.tsx diff --git a/app/template.tsx b/app/template.tsx new file mode 100644 index 0000000..09839be --- /dev/null +++ b/app/template.tsx @@ -0,0 +1,35 @@ +"use client"; + +import { motion, useReducedMotion } from "framer-motion"; +import { ReactNode } from "react"; + +export default function Template({ children }: { children: ReactNode }) { + const shouldReduceMotion = useReducedMotion(); + + const variants = { + hidden: { + opacity: 0, + y: shouldReduceMotion ? 0 : 16, + }, + enter: { + opacity: 1, + y: 0, + }, + }; + + return ( + + {children} + + ); +}