Skip to content

    Browse components

    Page Transition

    A staggered, layered column curtain that covers the old view, swaps content, then sweeps away to reveal the new one.

    Open
    Customize

    up
    down

    Installation

    npx shadcn@latest add @glint-ui/page-transition

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/page-transition.json

    Usage

    import { PageTransition } from "@/components/ui/page-transition";
    
    <PageTransition transitionKey={tab}>
      {views[tab]}
    </PageTransition>

    Props

    PropTypeDefaultDescription
    transitionKeystring—Change it (tab id, route) to play the transition.
    childrenReactNode—The current view.
    columnsnumber5Curtain columns; 1 is a plain wipe.
    colorsstring[]["#c6ff3d","#18181b"]Curtain layers, back to front.
    durationnumber550Ms for each half.
    staggernumber55Ms between columns.
    direction"up" | "down""up"Direction the curtain travels.
    classNamestring—Extra classes for the root element.