Skip to Content
Neshel-UI
Animations (experimental)Effects

Entrance & Reveal

The 11 effects E01–E11: purpose, API, options, examples, reduced motion and cost.

Experimental and not on npm

@neshel-ui/animations is a private package (0.0.0). It cannot be installed, and its API may change before a first publication. These pages document what exists in the repository.

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.
Preview: E01
Preview theme: E01
Saved to your library
e01.tsx
"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.

FadeInOptions
PropTypeDefaultDescription
appearbooleantruePlay when attached (default true). <Reveal> sets it to false while hydrating server-rendered markup, so visible content is not hidden again.
continuousboolean—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.
delaynumber—Delay before the entrance starts, in ms (0–5000, default 0).
durationnumber | DurationPreset320Duration of tween entrances in ms or a motionDefaults.duration preset (default 320).
easingEasing | EasingPreset"decelerate"Easing of tween entrances (default "decelerate").
holdboolean—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".
progressMotionValue—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.
reducedMotionReducedMotion"user"Reduced-motion policy (default "user").
replaystring | 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.
Preview: E02
Preview theme: E02
The fadeUp preset
40 px from the right
e02.tsx
"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.

FadeSlideOptions
PropTypeDefaultDescription
appearbooleantruePlay when attached (default true). <Reveal> sets it to false while hydrating server-rendered markup, so visible content is not hidden again.
continuousboolean—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.
delaynumber—Delay before the entrance starts, in ms (0–5000, default 0).
directionEntranceDirection"up"Direction of travel (default "up").
distancenumber—Travel distance in px (0–200, default 16).
durationnumber | DurationPreset320Duration of tween entrances in ms or a motionDefaults.duration preset (default 320).
easingEasing | EasingPreset"decelerate"Easing of tween entrances (default "decelerate").
holdboolean—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".
progressMotionValue—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.
reducedMotionReducedMotion"user"Reduced-motion policy (default "user").
replaystring | 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.
Preview: E03
Preview theme: E03
Grows from 80 %
e03.tsx
"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.

ScaleInOptions
PropTypeDefaultDescription
appearbooleantruePlay when attached (default true). <Reveal> sets it to false while hydrating server-rendered markup, so visible content is not hidden again.
continuousboolean—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.
delaynumber—Delay before the entrance starts, in ms (0–5000, default 0).
durationnumber | DurationPreset320Duration of tween entrances in ms or a motionDefaults.duration preset (default 320).
easingEasing | EasingPreset"decelerate"Easing of tween entrances (default "decelerate").
fromnumber—Start scale (0.3–1, default 0.92).
holdboolean—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".
progressMotionValue—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.
reducedMotionReducedMotion"user"Reduced-motion policy (default "user").
replaystring | 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.
Preview: E04
Preview theme: E04
Settles from 130 %
e04.tsx
"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).

ZoomInOptions
PropTypeDefaultDescription
appearbooleantruePlay when attached (default true). <Reveal> sets it to false while hydrating server-rendered markup, so visible content is not hidden again.
continuousboolean—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.
delaynumber—Delay before the entrance starts, in ms (0–5000, default 0).
durationnumber | DurationPreset320Duration of tween entrances in ms or a motionDefaults.duration preset (default 320).
easingEasing | EasingPreset"decelerate"Easing of tween entrances (default "decelerate").
fromnumber—Start scale (1–2, default 1.12).
holdboolean—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".
progressMotionValue—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.
reducedMotionReducedMotion"user"Reduced-motion policy (default "user").
replaystring | 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.
Preview: E05
Preview theme: E05
Comes into focus
e05.tsx
"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.

BlurInOptions
PropTypeDefaultDescription
amountnumber—Start blur radius in px (0–40, default 12).
appearbooleantruePlay when attached (default true). <Reveal> sets it to false while hydrating server-rendered markup, so visible content is not hidden again.
continuousboolean—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.
delaynumber—Delay before the entrance starts, in ms (0–5000, default 0).
durationnumber | DurationPreset320Duration of tween entrances in ms or a motionDefaults.duration preset (default 320).
easingEasing | EasingPreset"decelerate"Easing of tween entrances (default "decelerate").
holdboolean—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".
progressMotionValue—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.
reducedMotionReducedMotion"user"Reduced-motion policy (default "user").
replaystring | 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.
Preview: E06
Preview theme: E06
Inset from the left edge
Circle from the centre
e06.tsx
"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).

ClipRevealOptions
PropTypeDefaultDescription
appearbooleantruePlay when attached (default true). <Reveal> sets it to false while hydrating server-rendered markup, so visible content is not hidden again.
continuousboolean—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.
delaynumber—Delay before the entrance starts, in ms (0–5000, default 0).
directionEntranceDirection"up"Direction the inset reveal travels (default "up": revealed from the bottom edge upward).
durationnumber | DurationPreset320Duration of tween entrances in ms or a motionDefaults.duration preset (default 320).
easingEasing | EasingPreset"decelerate"Easing of tween entrances (default "decelerate").
holdboolean—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".
progressMotionValue—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.
reducedMotionReducedMotion"user"Reduced-motion policy (default "user").
replaystring | 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.
Preview: E07
Preview theme: E07
A soft edge travels across
e07.tsx
"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.

MaskWipeOptions
PropTypeDefaultDescription
appearbooleantruePlay when attached (default true). <Reveal> sets it to false while hydrating server-rendered markup, so visible content is not hidden again.
continuousboolean—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.
delaynumber—Delay before the entrance starts, in ms (0–5000, default 0).
directionEntranceDirection"right"Direction of the wipe (default "right": revealed from the left edge).
durationnumber | DurationPreset320Duration of tween entrances in ms or a motionDefaults.duration preset (default 320).
easingEasing | EasingPreset"decelerate"Easing of tween entrances (default "decelerate").
holdboolean—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".
progressMotionValue—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.
reducedMotionReducedMotion"user"Reduced-motion policy (default "user").
replaystring | number | boolean—Changing this value replays the entrance from the start.
softnessnumber—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.
Preview: E08
Preview theme: E08
Straightens as it appears
e08.tsx
"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.

RotateInOptions
PropTypeDefaultDescription
anglenumber—Start rotation in degrees (-180–180, default -6).
appearbooleantruePlay when attached (default true). <Reveal> sets it to false while hydrating server-rendered markup, so visible content is not hidden again.
continuousboolean—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.
delaynumber—Delay before the entrance starts, in ms (0–5000, default 0).
durationnumber | DurationPreset320Duration of tween entrances in ms or a motionDefaults.duration preset (default 320).
easingEasing | EasingPreset"decelerate"Easing of tween entrances (default "decelerate").
holdboolean—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".
progressMotionValue—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.
reducedMotionReducedMotion"user"Reduced-motion policy (default "user").
replaystring | 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.
Preview: E09
Preview theme: E09
Around the X axis
Around the Y axis
e09.tsx
"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).

FlipInOptions
PropTypeDefaultDescription
anglenumber—Start angle in degrees (-120–120, default 70).
appearbooleantruePlay 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").
continuousboolean—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.
delaynumber—Delay before the entrance starts, in ms (0–5000, default 0).
durationnumber | DurationPreset320Duration of tween entrances in ms or a motionDefaults.duration preset (default 320).
easingEasing | EasingPreset"decelerate"Easing of tween entrances (default "decelerate").
holdboolean—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".
perspectivenumber—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".
progressMotionValue—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.
reducedMotionReducedMotion"user"Reduced-motion policy (default "user").
replaystring | 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.
Preview: E10
Preview theme: E10

Loading the example…

e10.tsx
"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

StaggerOptions
PropTypeDefaultDescription
appearboolean——
delaynumber—Delay before the first child, in ms (0–5000, default 0).
holdboolean—Forwarded to every child (see EntranceOptions.hold).
intervalnumber—Delay between consecutive children in ms (0–1000, default 60).
maxStaggernumber—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).
optionsPartial<Options>—Options merged over the preset's options for every child (except delay, appear, replay).
orderStaggerOrder"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).
reducedMotionReducedMotion——
replaystring | 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.
Preview: E11
Preview theme: E11
Overshoots, then rests
e11.tsx
"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).

SpringInOptions
PropTypeDefaultDescription
appearbooleantruePlay when attached (default true). <Reveal> sets it to false while hydrating server-rendered markup, so visible content is not hidden again.
continuousboolean—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.
delaynumber—Delay before the entrance starts, in ms (0–5000, default 0).
directionEntranceDirection——
distancenumber—Travel distance in px (0–200, default 24).
durationnumber | DurationPreset320Duration of tween entrances in ms or a motionDefaults.duration preset (default 320).
easingEasing | EasingPreset"decelerate"Easing of tween entrances (default "decelerate").
fromnumber—Start scale (0.3–1, default 0.9).
holdboolean—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".
progressMotionValue—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.
reducedMotionReducedMotion"user"Reduced-motion policy (default "user").
replaystring | number | boolean—Changing this value replays the entrance from the start.
springSpringOptions | SpringPreset"bouncy"Spring (default "bouncy"); replaces duration/easing.
Edit on GitHub

On this page