Skip to content

    Browse components

    Enter View

    Slides, scales and fades its children into place when they scroll into view.

    Open
    Customize
    up
    down
    left
    right
    smooth
    spring
    snappy
    linear

    Installation

    npx shadcn@latest add @glint-ui/enter-view

    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/enter-view.json

    Usage

    import { EnterView } from "@/components/ui/enter-view";
    
    <EnterView direction="up" distance={80} ease="spring">
      <Card />
    </EnterView>

    Props

    PropTypeDefaultDescription
    childrenReactNode—Content to reveal.
    direction"up" | "down" | "left" | "right""up"Direction the content travels as it enters.
    distancenumber80Px travelled on entry.
    scalenumber0.96Starting scale; 1 disables scaling.
    initialOpacitynumber0Starting opacity.
    durationnumber900Duration in ms.
    delaynumber0Ms to wait once in view.
    ease"smooth" | "spring" | "snappy" | "linear""smooth"Easing preset, or pass any CSS timing function.
    thresholdnumber0.15Fraction of the element visible before it animates.
    oncebooleantrueAnimate only the first time it enters view.
    scrollContainerRefReactNode—Ref to a scrolling ancestor. Defaults to the viewport.
    classNamestring—Extra classes for the root element.