In View
Reveal content as it scrolls into view, as one block or one child at a time.
Overview
In View plays an entrance when its element scrolls into the viewport. Choose a preset (fade, slide-up, slide-down, blur, or scale) or pass your own variants. With stagger, each direct child is wrapped and enters in turn, which suits lists, feature grids, and timelines.
By default the entrance plays once. Set once={false} to replay it whenever the element leaves and comes back. amount controls how much of the element must be visible before it starts, and margin grows or shrinks the viewport, so an entrance can begin a little before the element reaches the screen.
Installation
Usage
import { InView } from "@/components/animated/in-view"
<InView preset="blur">
<h2>Built for teams</h2>
</InView>
<InView as="ul" preset="slide-up" stagger={0.08}>
{features.map((feature) => (
<FeatureCard key={feature.id} {...feature} />
))}
</InView>When as is ul or ol, staggered children are wrapped in li elements, so pass the item content rather than your own li.
Accessibility
Content is hidden only visually until it enters, so it stays in the page for screen readers and search. Under reduced motion the entrance keeps a short fade and drops movement, blur, and scale.
Keep entrances short and avoid them on content people need immediately, such as the first screen of a page or an error message. Content revealed on scroll should never be the only place an important instruction appears.