<GlideCNProvider>
The top-level context coordinator that initializes transition state, manages global baseline configuration, and detects user motion preferences.
Setup & Integration
Place <GlideCNProvider> at the root of your application layout. It creates the React Context that connects all <GlideCN> adapters, <Page> wrappers, and useGlide() hooks.
import { GlideCNProvider, GlideCN } from '@/components/glidecn';export default function RootLayout({ children }: { children: React.ReactNode }) { return ( <html lang="en"> <body> <GlideCNProvider defaultTransition="slide" defaultConfig={{ duration: 0.5 }}> <GlideCN> {children} </GlideCN> </GlideCNProvider> </body> </html> );}GlideCNProvider Properties
childrenRequiredReact.ReactNodeYour application layout and router tree. Must wrap router nodes so GlideCN can inject transition context and freeze exiting views.
defaultTransitionstringThe global fallback transition name used when a <Page> does not specify its own transition override. Must match a registered transition.
"fade"defaultConfigGlobal timing, easing curve, and flow direction baseline settings inherited by all child pages.
{}reducedMotionbooleanForce reduced motion accessibility on or off. By default, auto-detects OS-level prefers-reduced-motion.
undefined (auto)Property Guides
Explore detailed examples of every property provided by <GlideCNProvider> to customize global fallbacks, timing, and accessibility.