Entrance & Reveal
The 11 effects E01–E11: purpose, API, options, examples, reduced motion and cost.
Experimental and not on npm
Entrances play once when an element appears on the client and then leave it exactly as it was. <Reveal> takes one preset; <Stagger> applies one to each child. Server-rendered content stays visible and is not hidden again while hydrating (appear="client"); changing replayKey plays it again. All of them accept duration, delay, easing, onFinish and reducedMotion, and a timeline can drive them through progress. No stylesheet is needed.
E01 · Fade in
The plainest entrance: opacity from 0 to 1 with fadeIn. Use it when position carries no meaning, or as a calm default for content that replaces a loading state.
- Import
@neshel-ui/animations/entrance- API
fadeIn, Reveal- Stylesheet
- none needed
- Reduced motion
instant— the end state appears at once- Performance
- Transform and opacity, one write per frame through the shared scheduler; no layout work per frame.
"use client";
import { fadeIn, Reveal } from "@neshel-ui/animations/entrance";
import { Button } from "@neshel-ui/components";
import { useState } from "react";
export default function E01Example() {
const [run, setRun] = useState(0);
return (
<div className="grid justify-items-start gap-4">
<Reveal
preset={fadeIn}
replayKey={run}
className="rounded-xl border border-neshel-border bg-neshel-surface p-6 text-neshel-surface-foreground"
>
Saved to your library
</Reveal>
<Button variant="outline" onClick={() => setRun(run + 1)}>
Replay
</Button>
</div>
);
}Options: FadeInOptions
FadeInOptions
E01 — Fade in.
| Prop | Type | Default | Description |
|---|---|---|---|
| appear | boolean | true | Play when attached (default true). <Reveal> sets it to false while hydrating server-rendered
markup, so visible content is not hidden again. |
| continuous | boolean | — | A replay that interrupts a running run continues from the current progress with the remaining fraction of the duration, instead of restarting from the start pose. Default false. |
| delay | number | — | Delay before the entrance starts, in ms (0–5000, default 0). |
| duration | number | DurationPreset | 320 | Duration of tween entrances in ms or a motionDefaults.duration preset (default 320). |
| easing | Easing | EasingPreset | "decelerate" | Easing of tween entrances (default "decelerate"). |
| hold | boolean | — | While no run plays, keep the start pose (content hidden until a replay).
Ignored when motion is reduced and after beforeprint; <Reveal> never sets it. Default false. |
| onFinish | (status: MotionResult["status"]) => void | — | Called once per run: "completed", "cancelled" or "interrupted". |
| playback | "in" | "out" | "in" | playback: "out" plays end -> start and then holds the start pose (reverse on leave). Default "in". |
| progress | MotionValue | — | An external progress motion value (0 = start pose, 1 = visible)
renders the entrance instead of its own clock — seekable, scrubbable, reversible. appear, replay,
hold, playback, delay and onFinish are then ignored; reduced motion keeps the declared behaviour. |
| reducedMotion | ReducedMotion | "user" | Reduced-motion policy (default "user"). |
| replay | string | number | boolean | — | Changing this value replays the entrance from the start. |
E02 · Fade and slide
fadeSlide adds a short travel: direction (default "up") and distance (16 px, up to 200). fadeUp, fadeDown, fadeLeft and fadeRight are the same effect with the direction fixed.
- Import
@neshel-ui/animations/entrance- API
fadeSlide, fadeUp, fadeDown, fadeLeft, fadeRight, Reveal- Stylesheet
- none needed
- Reduced motion
fade— opacity only, no travel- Performance
- Transform and opacity, one write per frame through the shared scheduler; no layout work per frame.
"use client";
import { fadeSlide, fadeUp, Reveal } from "@neshel-ui/animations/entrance";
import { Button } from "@neshel-ui/components";
import { useState } from "react";
export default function E02Example() {
const [run, setRun] = useState(0);
return (
<div className="grid justify-items-start gap-4">
<Reveal
preset={fadeUp}
replayKey={run}
className="rounded-xl border border-neshel-border bg-neshel-surface p-6 text-neshel-surface-foreground"
>
The fadeUp preset
</Reveal>
<Reveal
preset={fadeSlide}
options={{ direction: "left", distance: 40 }}
replayKey={run}
className="rounded-xl border border-neshel-border bg-neshel-surface p-6 text-neshel-surface-foreground"
>
40 px from the right
</Reveal>
<Button variant="outline" onClick={() => setRun(run + 1)}>
Replay
</Button>
</div>
);
}Options: FadeSlideOptions
FadeSlideOptions
E02 — Fade + slide.
| Prop | Type | Default | Description |
|---|---|---|---|
| appear | boolean | true | Play when attached (default true). <Reveal> sets it to false while hydrating server-rendered
markup, so visible content is not hidden again. |
| continuous | boolean | — | A replay that interrupts a running run continues from the current progress with the remaining fraction of the duration, instead of restarting from the start pose. Default false. |
| delay | number | — | Delay before the entrance starts, in ms (0–5000, default 0). |
| direction | EntranceDirection | "up" | Direction of travel (default "up"). |
| distance | number | — | Travel distance in px (0–200, default 16). |
| duration | number | DurationPreset | 320 | Duration of tween entrances in ms or a motionDefaults.duration preset (default 320). |
| easing | Easing | EasingPreset | "decelerate" | Easing of tween entrances (default "decelerate"). |
| hold | boolean | — | While no run plays, keep the start pose (content hidden until a replay).
Ignored when motion is reduced and after beforeprint; <Reveal> never sets it. Default false. |
| onFinish | (status: MotionResult["status"]) => void | — | Called once per run: "completed", "cancelled" or "interrupted". |
| playback | "in" | "out" | "in" | playback: "out" plays end -> start and then holds the start pose (reverse on leave). Default "in". |
| progress | MotionValue | — | An external progress motion value (0 = start pose, 1 = visible)
renders the entrance instead of its own clock — seekable, scrubbable, reversible. appear, replay,
hold, playback, delay and onFinish are then ignored; reduced motion keeps the declared behaviour. |
| reducedMotion | ReducedMotion | "user" | Reduced-motion policy (default "user"). |
| replay | string | number | boolean | — | Changing this value replays the entrance from the start. |
E03 · Scale in
scaleIn grows the element from from (0.92, between 0.3 and 1) while it fades in. It suits small surfaces such as cards, popups and badges.
- Import
@neshel-ui/animations/entrance- API
scaleIn, Reveal- Stylesheet
- none needed
- Reduced motion
fade— opacity only, no travel- Performance
- Transform and opacity, one write per frame through the shared scheduler; no layout work per frame.
"use client";
import { Reveal, scaleIn } from "@neshel-ui/animations/entrance";
import { Button } from "@neshel-ui/components";
import { useState } from "react";
export default function E03Example() {
const [run, setRun] = useState(0);
return (
<div className="grid justify-items-start gap-4">
<Reveal
preset={scaleIn}
options={{ from: 0.8 }}
replayKey={run}
className="rounded-xl border border-neshel-border bg-neshel-surface p-6 text-neshel-surface-foreground"
>
Grows from 80 %
</Reveal>
<Button variant="outline" onClick={() => setRun(run + 1)}>
Replay
</Button>
</div>
);
}Options: ScaleInOptions
ScaleInOptions
E03 — Scale in.
| Prop | Type | Default | Description |
|---|---|---|---|
| appear | boolean | true | Play when attached (default true). <Reveal> sets it to false while hydrating server-rendered
markup, so visible content is not hidden again. |
| continuous | boolean | — | A replay that interrupts a running run continues from the current progress with the remaining fraction of the duration, instead of restarting from the start pose. Default false. |
| delay | number | — | Delay before the entrance starts, in ms (0–5000, default 0). |
| duration | number | DurationPreset | 320 | Duration of tween entrances in ms or a motionDefaults.duration preset (default 320). |
| easing | Easing | EasingPreset | "decelerate" | Easing of tween entrances (default "decelerate"). |
| from | number | — | Start scale (0.3–1, default 0.92). |
| hold | boolean | — | While no run plays, keep the start pose (content hidden until a replay).
Ignored when motion is reduced and after beforeprint; <Reveal> never sets it. Default false. |
| onFinish | (status: MotionResult["status"]) => void | — | Called once per run: "completed", "cancelled" or "interrupted". |
| playback | "in" | "out" | "in" | playback: "out" plays end -> start and then holds the start pose (reverse on leave). Default "in". |
| progress | MotionValue | — | An external progress motion value (0 = start pose, 1 = visible)
renders the entrance instead of its own clock — seekable, scrubbable, reversible. appear, replay,
hold, playback, delay and onFinish are then ignored; reduced motion keeps the declared behaviour. |
| reducedMotion | ReducedMotion | "user" | Reduced-motion policy (default "user"). |
| replay | string | number | boolean | — | Changing this value replays the entrance from the start. |
E04 · Zoom in
zoomIn is the opposite of scale in: it starts larger than the final size (from 1.12, up to 2) and settles. It can overflow its box while it runs, so leave room or clip the parent.
- Import
@neshel-ui/animations/entrance- API
zoomIn, Reveal- Stylesheet
- none needed
- Reduced motion
fade— opacity only, no travel- Performance
- Transform and opacity, one write per frame through the shared scheduler; no layout work per frame.
"use client";
import { Reveal, zoomIn } from "@neshel-ui/animations/entrance";
import { Button } from "@neshel-ui/components";
import { useState } from "react";
export default function E04Example() {
const [run, setRun] = useState(0);
return (
<div className="grid justify-items-start gap-4">
<Reveal
preset={zoomIn}
options={{ from: 1.3 }}
replayKey={run}
className="rounded-xl border border-neshel-border bg-neshel-surface p-6 text-neshel-surface-foreground"
>
Settles from 130 %
</Reveal>
<Button variant="outline" onClick={() => setRun(run + 1)}>
Replay
</Button>
</div>
);
}Options: ZoomInOptions
ZoomInOptions
E04 — Zoom out → in (starts larger and settles).
| Prop | Type | Default | Description |
|---|---|---|---|
| appear | boolean | true | Play when attached (default true). <Reveal> sets it to false while hydrating server-rendered
markup, so visible content is not hidden again. |
| continuous | boolean | — | A replay that interrupts a running run continues from the current progress with the remaining fraction of the duration, instead of restarting from the start pose. Default false. |
| delay | number | — | Delay before the entrance starts, in ms (0–5000, default 0). |
| duration | number | DurationPreset | 320 | Duration of tween entrances in ms or a motionDefaults.duration preset (default 320). |
| easing | Easing | EasingPreset | "decelerate" | Easing of tween entrances (default "decelerate"). |
| from | number | — | Start scale (1–2, default 1.12). |
| hold | boolean | — | While no run plays, keep the start pose (content hidden until a replay).
Ignored when motion is reduced and after beforeprint; <Reveal> never sets it. Default false. |
| onFinish | (status: MotionResult["status"]) => void | — | Called once per run: "completed", "cancelled" or "interrupted". |
| playback | "in" | "out" | "in" | playback: "out" plays end -> start and then holds the start pose (reverse on leave). Default "in". |
| progress | MotionValue | — | An external progress motion value (0 = start pose, 1 = visible)
renders the entrance instead of its own clock — seekable, scrubbable, reversible. appear, replay,
hold, playback, delay and onFinish are then ignored; reduced motion keeps the declared behaviour. |
| reducedMotion | ReducedMotion | "user" | Reduced-motion policy (default "user"). |
| replay | string | number | boolean | — | Changing this value replays the entrance from the start. |
E05 · Blur in
blurIn sharpens the content from amount pixels of blur (12, up to 40). It owns the filter channel while it runs, so another filter effect on the same element waits for it.
- Import
@neshel-ui/animations/entrance- API
blurIn, Reveal- Stylesheet
- none needed
- Reduced motion
fade— opacity only, no travel- Performance
- Repaints the element (colour, gradient, clip, mask, blur or stroke) while it runs; keep the area small.
"use client";
import { blurIn, Reveal } from "@neshel-ui/animations/entrance";
import { Button } from "@neshel-ui/components";
import { useState } from "react";
export default function E05Example() {
const [run, setRun] = useState(0);
return (
<div className="grid justify-items-start gap-4">
<Reveal
preset={blurIn}
options={{ amount: 16, duration: 600 }}
replayKey={run}
className="rounded-xl border border-neshel-border bg-neshel-surface p-6 text-neshel-surface-foreground"
>
Comes into focus
</Reveal>
<Button variant="outline" onClick={() => setRun(run + 1)}>
Replay
</Button>
</div>
);
}Options: BlurInOptions
BlurInOptions
E05 — Blur in.
| Prop | Type | Default | Description |
|---|---|---|---|
| amount | number | — | Start blur radius in px (0–40, default 12). |
| appear | boolean | true | Play when attached (default true). <Reveal> sets it to false while hydrating server-rendered
markup, so visible content is not hidden again. |
| continuous | boolean | — | A replay that interrupts a running run continues from the current progress with the remaining fraction of the duration, instead of restarting from the start pose. Default false. |
| delay | number | — | Delay before the entrance starts, in ms (0–5000, default 0). |
| duration | number | DurationPreset | 320 | Duration of tween entrances in ms or a motionDefaults.duration preset (default 320). |
| easing | Easing | EasingPreset | "decelerate" | Easing of tween entrances (default "decelerate"). |
| hold | boolean | — | While no run plays, keep the start pose (content hidden until a replay).
Ignored when motion is reduced and after beforeprint; <Reveal> never sets it. Default false. |
| onFinish | (status: MotionResult["status"]) => void | — | Called once per run: "completed", "cancelled" or "interrupted". |
| playback | "in" | "out" | "in" | playback: "out" plays end -> start and then holds the start pose (reverse on leave). Default "in". |
| progress | MotionValue | — | An external progress motion value (0 = start pose, 1 = visible)
renders the entrance instead of its own clock — seekable, scrubbable, reversible. appear, replay,
hold, playback, delay and onFinish are then ignored; reduced motion keeps the declared behaviour. |
| reducedMotion | ReducedMotion | "user" | Reduced-motion policy (default "user"). |
| replay | string | number | boolean | — | Changing this value replays the entrance from the start. |
E06 · Clip reveal
clipReveal uncovers the element with clip-path: an inset that travels in direction, or a circle from the centre with shape: "circle" (the clipCircle preset). Shadows outside the box are clipped until it ends.
- Import
@neshel-ui/animations/entrance- API
clipReveal, clipCircle, Reveal- Stylesheet
- none needed
- Reduced motion
instant— the end state appears at once- Performance
- Repaints the element (colour, gradient, clip, mask, blur or stroke) while it runs; keep the area small.
"use client";
import { clipCircle, clipReveal, Reveal } from "@neshel-ui/animations/entrance";
import { Button } from "@neshel-ui/components";
import { useState } from "react";
export default function E06Example() {
const [run, setRun] = useState(0);
return (
<div className="grid justify-items-start gap-4">
<Reveal
preset={clipReveal}
options={{ direction: "right" }}
replayKey={run}
className="rounded-xl border border-neshel-border bg-neshel-surface p-6 text-neshel-surface-foreground"
>
Inset from the left edge
</Reveal>
<Reveal
preset={clipCircle}
replayKey={run}
className="rounded-xl border border-neshel-border bg-neshel-surface p-6 text-neshel-surface-foreground"
>
Circle from the centre
</Reveal>
<Button variant="outline" onClick={() => setRun(run + 1)}>
Replay
</Button>
</div>
);
}Options: ClipRevealOptions
ClipRevealOptions
E06 — Clip reveal (inset from an edge, or a circle from the centre).
| Prop | Type | Default | Description |
|---|---|---|---|
| appear | boolean | true | Play when attached (default true). <Reveal> sets it to false while hydrating server-rendered
markup, so visible content is not hidden again. |
| continuous | boolean | — | A replay that interrupts a running run continues from the current progress with the remaining fraction of the duration, instead of restarting from the start pose. Default false. |
| delay | number | — | Delay before the entrance starts, in ms (0–5000, default 0). |
| direction | EntranceDirection | "up" | Direction the inset reveal travels (default "up": revealed from the bottom edge upward). |
| duration | number | DurationPreset | 320 | Duration of tween entrances in ms or a motionDefaults.duration preset (default 320). |
| easing | Easing | EasingPreset | "decelerate" | Easing of tween entrances (default "decelerate"). |
| hold | boolean | — | While no run plays, keep the start pose (content hidden until a replay).
Ignored when motion is reduced and after beforeprint; <Reveal> never sets it. Default false. |
| onFinish | (status: MotionResult["status"]) => void | — | Called once per run: "completed", "cancelled" or "interrupted". |
| playback | "in" | "out" | "in" | playback: "out" plays end -> start and then holds the start pose (reverse on leave). Default "in". |
| progress | MotionValue | — | An external progress motion value (0 = start pose, 1 = visible)
renders the entrance instead of its own clock — seekable, scrubbable, reversible. appear, replay,
hold, playback, delay and onFinish are then ignored; reduced motion keeps the declared behaviour. |
| reducedMotion | ReducedMotion | "user" | Reduced-motion policy (default "user"). |
| replay | string | number | boolean | — | Changing this value replays the entrance from the start. |
| shape | "inset" | "circle" | — | "inset" (default) or "circle". |
E07 · Gradient-mask wipe
maskWipe reveals the element with a soft edge that travels in direction (default "right"); softness is the width of that edge as a percentage (25). It owns the mask channel while it runs.
- Import
@neshel-ui/animations/entrance- API
maskWipe, Reveal- Stylesheet
- none needed
- Reduced motion
instant— the end state appears at once- Performance
- Repaints the element (colour, gradient, clip, mask, blur or stroke) while it runs; keep the area small.
"use client";
import { maskWipe, Reveal } from "@neshel-ui/animations/entrance";
import { Button } from "@neshel-ui/components";
import { useState } from "react";
export default function E07Example() {
const [run, setRun] = useState(0);
return (
<div className="grid justify-items-start gap-4">
<Reveal
preset={maskWipe}
options={{ softness: 50, duration: 900 }}
replayKey={run}
className="rounded-xl border border-neshel-border bg-neshel-surface p-6 text-neshel-surface-foreground"
>
A soft edge travels across
</Reveal>
<Button variant="outline" onClick={() => setRun(run + 1)}>
Replay
</Button>
</div>
);
}Options: MaskWipeOptions
MaskWipeOptions
E07 — Gradient-mask wipe.
| Prop | Type | Default | Description |
|---|---|---|---|
| appear | boolean | true | Play when attached (default true). <Reveal> sets it to false while hydrating server-rendered
markup, so visible content is not hidden again. |
| continuous | boolean | — | A replay that interrupts a running run continues from the current progress with the remaining fraction of the duration, instead of restarting from the start pose. Default false. |
| delay | number | — | Delay before the entrance starts, in ms (0–5000, default 0). |
| direction | EntranceDirection | "right" | Direction of the wipe (default "right": revealed from the left edge). |
| duration | number | DurationPreset | 320 | Duration of tween entrances in ms or a motionDefaults.duration preset (default 320). |
| easing | Easing | EasingPreset | "decelerate" | Easing of tween entrances (default "decelerate"). |
| hold | boolean | — | While no run plays, keep the start pose (content hidden until a replay).
Ignored when motion is reduced and after beforeprint; <Reveal> never sets it. Default false. |
| onFinish | (status: MotionResult["status"]) => void | — | Called once per run: "completed", "cancelled" or "interrupted". |
| playback | "in" | "out" | "in" | playback: "out" plays end -> start and then holds the start pose (reverse on leave). Default "in". |
| progress | MotionValue | — | An external progress motion value (0 = start pose, 1 = visible)
renders the entrance instead of its own clock — seekable, scrubbable, reversible. appear, replay,
hold, playback, delay and onFinish are then ignored; reduced motion keeps the declared behaviour. |
| reducedMotion | ReducedMotion | "user" | Reduced-motion policy (default "user"). |
| replay | string | number | boolean | — | Changing this value replays the entrance from the start. |
| softness | number | — | Width of the soft edge as a percentage of the element (0–100, default 25). |
E08 · Rotate in
rotateIn straightens the element from angle degrees (−6, between −180 and 180) as it fades in. Small angles read as a gesture; large ones are distracting on text.
- Import
@neshel-ui/animations/entrance- API
rotateIn, Reveal- Stylesheet
- none needed
- Reduced motion
fade— opacity only, no travel- Performance
- Transform and opacity, one write per frame through the shared scheduler; no layout work per frame.
"use client";
import { Reveal, rotateIn } from "@neshel-ui/animations/entrance";
import { Button } from "@neshel-ui/components";
import { useState } from "react";
export default function E08Example() {
const [run, setRun] = useState(0);
return (
<div className="grid justify-items-start gap-4">
<Reveal
preset={rotateIn}
options={{ angle: -12 }}
replayKey={run}
className="rounded-xl border border-neshel-border bg-neshel-surface p-6 text-neshel-surface-foreground"
>
Straightens as it appears
</Reveal>
<Button variant="outline" onClick={() => setRun(run + 1)}>
Replay
</Button>
</div>
);
}Options: RotateInOptions
RotateInOptions
E08 — Rotate in.
| Prop | Type | Default | Description |
|---|---|---|---|
| angle | number | — | Start rotation in degrees (-180–180, default -6). |
| appear | boolean | true | Play when attached (default true). <Reveal> sets it to false while hydrating server-rendered
markup, so visible content is not hidden again. |
| continuous | boolean | — | A replay that interrupts a running run continues from the current progress with the remaining fraction of the duration, instead of restarting from the start pose. Default false. |
| delay | number | — | Delay before the entrance starts, in ms (0–5000, default 0). |
| duration | number | DurationPreset | 320 | Duration of tween entrances in ms or a motionDefaults.duration preset (default 320). |
| easing | Easing | EasingPreset | "decelerate" | Easing of tween entrances (default "decelerate"). |
| hold | boolean | — | While no run plays, keep the start pose (content hidden until a replay).
Ignored when motion is reduced and after beforeprint; <Reveal> never sets it. Default false. |
| onFinish | (status: MotionResult["status"]) => void | — | Called once per run: "completed", "cancelled" or "interrupted". |
| playback | "in" | "out" | "in" | playback: "out" plays end -> start and then holds the start pose (reverse on leave). Default "in". |
| progress | MotionValue | — | An external progress motion value (0 = start pose, 1 = visible)
renders the entrance instead of its own clock — seekable, scrubbable, reversible. appear, replay,
hold, playback, delay and onFinish are then ignored; reduced motion keeps the declared behaviour. |
| reducedMotion | ReducedMotion | "user" | Reduced-motion policy (default "user"). |
| replay | string | number | boolean | — | Changing this value replays the entrance from the start. |
E09 · Flip in
flipIn turns the element around an axis: axis, angle (70) and perspective (800 px). flipX and flipY fix the axis. The perspective is part of the composed transform, so no wrapper is needed.
- Import
@neshel-ui/animations/entrance- API
flipIn, flipX, flipY, Reveal- Stylesheet
- none needed
- Reduced motion
fade— opacity only, no travel- Performance
- Transform and opacity, one write per frame through the shared scheduler; no layout work per frame.
"use client";
import { flipX, flipY, Reveal } from "@neshel-ui/animations/entrance";
import { Button } from "@neshel-ui/components";
import { useState } from "react";
export default function E09Example() {
const [run, setRun] = useState(0);
return (
<div className="grid justify-items-start gap-4">
<Reveal
preset={flipX}
replayKey={run}
className="rounded-xl border border-neshel-border bg-neshel-surface p-6 text-neshel-surface-foreground"
>
Around the X axis
</Reveal>
<Reveal
preset={flipY}
replayKey={run}
className="rounded-xl border border-neshel-border bg-neshel-surface p-6 text-neshel-surface-foreground"
>
Around the Y axis
</Reveal>
<Button variant="outline" onClick={() => setRun(run + 1)}>
Replay
</Button>
</div>
);
}Options: FlipInOptions
FlipInOptions
E09 — Flip in about the X or Y axis (perspective inside the composed transform; no wrapper).
| Prop | Type | Default | Description |
|---|---|---|---|
| angle | number | — | Start angle in degrees (-120–120, default 70). |
| appear | boolean | true | Play when attached (default true). <Reveal> sets it to false while hydrating server-rendered
markup, so visible content is not hidden again. |
| axis | "x" | "y" | "x" | Rotation axis (default "x"). |
| continuous | boolean | — | A replay that interrupts a running run continues from the current progress with the remaining fraction of the duration, instead of restarting from the start pose. Default false. |
| delay | number | — | Delay before the entrance starts, in ms (0–5000, default 0). |
| duration | number | DurationPreset | 320 | Duration of tween entrances in ms or a motionDefaults.duration preset (default 320). |
| easing | Easing | EasingPreset | "decelerate" | Easing of tween entrances (default "decelerate"). |
| hold | boolean | — | While no run plays, keep the start pose (content hidden until a replay).
Ignored when motion is reduced and after beforeprint; <Reveal> never sets it. Default false. |
| onFinish | (status: MotionResult["status"]) => void | — | Called once per run: "completed", "cancelled" or "interrupted". |
| perspective | number | — | Perspective distance in px (200–5000, default 800). |
| playback | "in" | "out" | "in" | playback: "out" plays end -> start and then holds the start pose (reverse on leave). Default "in". |
| progress | MotionValue | — | An external progress motion value (0 = start pose, 1 = visible)
renders the entrance instead of its own clock — seekable, scrubbable, reversible. appear, replay,
hold, playback, delay and onFinish are then ignored; reduced motion keeps the declared behaviour. |
| reducedMotion | ReducedMotion | "user" | Reduced-motion policy (default "user"). |
| replay | string | number | boolean | — | Changing this value replays the entrance from the start. |
E10 · Staggered children
<Stagger> gives each element child the same entrance with a delay of interval ms (60). order starts from the "start", "end" or "center", and maxStagger (900 ms) caps the total so that long lists do not keep people waiting.
- Import
@neshel-ui/animations/entrance- API
stagger, Stagger- Stylesheet
- none needed
- Reduced motion
fade— opacity only, no travel- Performance
- Transform and opacity, one write per frame through the shared scheduler; no layout work per frame.
Loading the example…
"use client";
import { fadeUp, Stagger } from "@neshel-ui/animations/entrance";
import { Button } from "@neshel-ui/components";
import { useState } from "react";
export default function E10Example() {
const [run, setRun] = useState(0);
return (
<div className="grid justify-items-start gap-4">
<Stagger
preset={fadeUp}
interval={90}
order="start"
replayKey={run}
className="flex flex-wrap gap-3"
>
{["Plan", "Build", "Review", "Ship"].map((step) => (
<div
key={step}
className="rounded-xl border border-neshel-border bg-neshel-surface p-6 text-neshel-surface-foreground"
>
{step}
</div>
))}
</Stagger>
<Button variant="outline" onClick={() => setRun(run + 1)}>
Replay
</Button>
</div>
);
}Options: StaggerOptions
StaggerOptions
| Prop | Type | Default | Description |
|---|---|---|---|
| appear | boolean | — | — |
| delay | number | — | Delay before the first child, in ms (0–5000, default 0). |
| hold | boolean | — | Forwarded to every child (see EntranceOptions.hold). |
| interval | number | — | Delay between consecutive children in ms (0–1000, default 60). |
| maxStagger | number | — | Upper bound of the total stagger in ms; the interval shrinks to fit (0–3000, default 900). |
| onFinish | (status: MotionResult["status"]) => void | — | Called once when every child's run has settled (with the last status). |
| options | Partial<Options> | — | Options merged over the preset's options for every child (except delay, appear, replay). |
| order | StaggerOrder | "start" | Which child starts first (default "start"). |
| playback | "in" | "out" | — | Forwarded to every child (see EntranceOptions.playback). |
| preset(required) | PresetInput<Options, any> | — | Entrance applied to every child (an entrance definition or preset). |
| reducedMotion | ReducedMotion | — | — |
| replay | string | number | boolean | — | — |
E11 · Spring entrance
springIn enters with a spring instead of a fixed duration: spring (stiffness and damping or a preset), distance (24) and from (0.9). It can overshoot and can be interrupted without a jump.
- Import
@neshel-ui/animations/entrance- API
springIn, Reveal- Stylesheet
- none needed
- Reduced motion
fade— opacity only, no travel- Performance
- Transform and opacity, one write per frame through the shared scheduler; no layout work per frame.
"use client";
import { Reveal, springIn } from "@neshel-ui/animations/entrance";
import { Button } from "@neshel-ui/components";
import { useState } from "react";
export default function E11Example() {
const [run, setRun] = useState(0);
return (
<div className="grid justify-items-start gap-4">
<Reveal
preset={springIn}
options={{ spring: { stiffness: 320, damping: 14 } }}
replayKey={run}
className="rounded-xl border border-neshel-border bg-neshel-surface p-6 text-neshel-surface-foreground"
>
Overshoots, then rests
</Reveal>
<Button variant="outline" onClick={() => setRun(run + 1)}>
Replay
</Button>
</div>
);
}Options: SpringInOptions
SpringInOptions
E11 — Spring entrance with overshoot (engine spring; interruptible).
| Prop | Type | Default | Description |
|---|---|---|---|
| appear | boolean | true | Play when attached (default true). <Reveal> sets it to false while hydrating server-rendered
markup, so visible content is not hidden again. |
| continuous | boolean | — | A replay that interrupts a running run continues from the current progress with the remaining fraction of the duration, instead of restarting from the start pose. Default false. |
| delay | number | — | Delay before the entrance starts, in ms (0–5000, default 0). |
| direction | EntranceDirection | — | — |
| distance | number | — | Travel distance in px (0–200, default 24). |
| duration | number | DurationPreset | 320 | Duration of tween entrances in ms or a motionDefaults.duration preset (default 320). |
| easing | Easing | EasingPreset | "decelerate" | Easing of tween entrances (default "decelerate"). |
| from | number | — | Start scale (0.3–1, default 0.9). |
| hold | boolean | — | While no run plays, keep the start pose (content hidden until a replay).
Ignored when motion is reduced and after beforeprint; <Reveal> never sets it. Default false. |
| onFinish | (status: MotionResult["status"]) => void | — | Called once per run: "completed", "cancelled" or "interrupted". |
| playback | "in" | "out" | "in" | playback: "out" plays end -> start and then holds the start pose (reverse on leave). Default "in". |
| progress | MotionValue | — | An external progress motion value (0 = start pose, 1 = visible)
renders the entrance instead of its own clock — seekable, scrubbable, reversible. appear, replay,
hold, playback, delay and onFinish are then ignored; reduced motion keeps the declared behaviour. |
| reducedMotion | ReducedMotion | "user" | Reduced-motion policy (default "user"). |
| replay | string | number | boolean | — | Changing this value replays the entrance from the start. |
| spring | SpringOptions | SpringPreset | "bouncy" | Spring (default "bouncy"); replaces duration/easing. |