Search for a command to run...
navigate
Stacks sections that render settled with the page and fade in when one is added later — a tab revealing more cards, a section that appears after an action.
import { AnimatedSections } from "@delphi/ui/components/animated-sections";
export function Example() {
return (
<AnimatedSections className="flex flex-col gap-2 text-sm">
<div>One</div>
<div>Two</div>
<div>Three</div>
</AnimatedSections>
);
}Sections present when AnimatedSections mounts paint settled: a page's own content shows the moment it renders, on first load and on navigation. A section added afterwards enters with a 2px rise and fade over 180 ms, staggered by staggerDelay and capped at 90 ms of delay. The wrapper renders a <div> with flex flex-col by default; override className to change direction or layout. prefers-reduced-motion skips the entrance.
Welcome back
Three new threads since you last visited.
Key each child by identity so a section that stays keeps its place and only the new one enters. Remounting the whole AnimatedSections (bumping its key) renders everything settled again; it does not replay.
AnimatedSections| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Each direct child gets wrapped in its own div. |
staggerDelay | number | 0.03 | Seconds between sections added in the same render. Total delay is capped at 90 ms. |
className | string | — | Applied to the outer div. Default classes include flex flex-col. |
itemClassName | string | — | Applied to each per-child div wrapper. Useful for shared item padding or per-item gaps. |
For a single element that should enter when it appears after the page is shown, wrap the region in EntranceGroup and the element in Entrance from @delphi/ui/components/entrance.
Use where sections come and go on a page that is already showing: tabs filtering cards, a section that appears once something is connected.
Bump key to make a page or a refetch replay its entrance. Content the user came to read should
never wait on motion.