@neshel-ui/animations/cinematic
Every export of @neshel-ui/animations/cinematic, generated from its declarations.
Experimental and not on npm
Signatures, members and defaults, generated from the built declarations. For explanations and examples read the guide.
CameraStagecomponentC03: a stage (viewport) over a large canvas; the camera pans and zooms the canvas.
({ label, camera, minZoom, maxZoom, bounds, padding, followFocus, initial, reducedMotion, canvasClassName, canvasStyle, className, children, ref, ...rest }: CameraStageProps): ElementChaptercomponentA chapter of the nearest `<SceneChapters>`; marked `data-active` while active.
({ id, weight, children, ref, ...rest }: ChapterProps): ElementCurtainRevealcomponentC05: a curtain (two drapes) or a shutter (slats) opens over the content.
({ pattern, slats, ...props }: CurtainRevealProps): ElementDepthOfFieldcomponentC08: its element children are depth layers; layers away from `focus` blur.
({ focus, maxBlur, falloff, duration, reducedMotion, className, children, ref, ...rest }: DepthOfFieldProps): ElementLetterboxcomponentC10: cinematic bars slide in from the top and bottom while `active`.
({ active, ratio, size, duration, reducedMotion, className, style, children, ref, ...rest }: LetterboxProps): ElementSceneChapterscomponentC02: chapters and segments scrubbed by a progress source (e.g. a scroll scene) or played on a clock.
({ source, progress, autoplay, unit, reducedMotion, onChapterChange, className, children, ...rest }: SceneChaptersProps): ElementSceneSegmentcomponentA segment of the enclosing `<Chapter>`: its element follows the chapter's progress.
({ effect, options, from, to, span, asChild, children, ref, ...rest }: SceneSegmentProps): ElementSplitRevealcomponentC04: two package-rendered halves part to reveal the content.
({ direction, ...props }: SplitRevealProps): ElementSpotlightcomponentC07: dims the stage except a lit circle around `target`.
({ target, radius, padding, duration, reducedMotion, className, children, ref, ...rest }: SpotlightProps): ElementStoryboardcomponentC09: frames with an opt-in, pausable autoplay (APG carousel semantics).
({ label, autoplay, interval, loop, transition, duration, reducedMotion, labels, onChange, className, children, ref, ...rest }: StoryboardProps): ElementStoryboardFramecomponentA frame of a `<Storyboard>` (its children are the frame content).
({ children }: StoryboardFrameProps): ElementTitleSequencecomponentC06: the element children (consumer lines) enter in sequence over a background.
({ effect, options, interval, background, replay, appear, reducedMotion, onComplete, className, children, ref, ...rest }: TitleSequenceProps): ElementcreateCamerafunction(stage: HTMLElement, canvas: HTMLElement, options?: CameraOptions | undefined): CameracreateCoverfunction(container: HTMLElement, options?: CoverOptions | undefined): CovercreateDepthOfFieldfunction(container: HTMLElement, options?: DepthOfFieldOptions | undefined): DepthOfFieldcreateLetterboxfunction(frame: HTMLElement, options?: LetterboxOptions | undefined): LetterboxControlcreateSceneChaptersfunction(options: SceneChaptersOptions): SceneChapterscreateSpotlightfunction(stage: HTMLElement, options?: SpotlightOptions | undefined): SpotlightcreateStoryboardfunction(root: HTMLElement, frames: readonly HTMLElement[], options?: StoryboardOptions | undefined): StoryboardcreateTimelinefunction(options?: TimelineOptions | undefined): TimelinegetCinematicDebugInfofunctionSnapshot of the cinematic counters (development and tests).
(): CinematicDebugInfotitleSequencefunction(timeline: Timeline, options: TitleSequenceOptions): TimelineuseCamerafunctionA stable handle for `<CameraStage camera={…}>`.
(): CameraHandleuseTimelinefunction(build: (timeline: Timeline) => void, deps?: DependencyList | undefined, options?: (TimelineOptions & { autoplay?: boolean | undefined; }) | undefined): TimelineHandleCamerainterfaceCamera
Camera Prop Type Default Description destroy(required) () => void— — jump(required) (target: CameraTarget) => void— — pose(required) Readonly<CameraPose>— — refresh(required) () => void— Re-measure stage and canvas (after changes no observer can see). to(required) (target: CameraTarget, options?: MoveOptions) => Promise<unknown>— — track(required) (target: CameraTarget, options?: TrackOptions) => ValueTrackInput— A timeline track from the last planned pose to target.CameraHandleinterfaceCameraHandle
CameraHandle Prop Type Default Description current(required) Camera | undefined— — jump(required) (target: CameraTarget) => void— — to(required) (target: CameraTarget, options?: { duration?: number; }) => Promise<unknown>— — CameraOptionsinterfaceCameraOptions
CameraOptions Prop Type Default Description bounds "contain" | "none"— "contain"keeps the canvas covering the stage (default);"none"allows any pose.followFocus booleantruePan to elements that receive keyboard focus inside the canvas (default true). initial Partial<CameraPose>— Initial pose (default: canvas centre at zoom 1). maxZoom number41–10 (default 4). minZoom number0.50.1–1 (default 0.5). onChange (pose: CameraPose) => void— — padding number— Space around a focused element (0–400, default 24). reducedMotion ReducedMotion— — CameraPoseinterfaceCameraPose
CameraPose Prop Type Default Description x(required) number— — y(required) number— — zoom(required) number— — CameraStagePropsinterfaceCameraStageProps
CameraStageProps Prop Type Default Description bounds "contain" | "none"— "contain"keeps the canvas covering the stage (default);"none"allows any pose.camera CameraHandle— — canvasClassName string— — canvasStyle CSSProperties— — children ReactNode— — followFocus booleantruePan to elements that receive keyboard focus inside the canvas (default true). initial Partial<CameraPose>— Initial pose (default: canvas centre at zoom 1). label(required) string— Accessible name of the stage region (required: it is a scrollable region without JS). maxZoom number41–10 (default 4). minZoom number0.50.1–1 (default 0.5). padding number— Space around a focused element (0–400, default 24). reducedMotion ReducedMotion— — ref Ref<HTMLElement>— — Also accepts the props of: React DOM attributes.
ChapterInputinterfaceChapterInput
ChapterInput Prop Type Default Description element Element | null— Element marked data-activewhile the chapter is active.id(required) string— — weight number— Relative length (0.1–10, default 1). ChapterPropsinterfaceChapterProps
ChapterProps Prop Type Default Description children ReactNode— — id(required) string— — ref Ref<HTMLDivElement>— — weight number— Relative length (0.1–10, default 1). Also accepts the props of: React DOM attributes.
CinematicDebugInfointerfaceCinematicDebugInfo
CinematicDebugInfo Prop Type Default Description clocks(required) number— — detached(required) number— — listeners(required) number— — observers(required) number— — reads(required) number— — renders(required) number— — timelines(required) number— — waits(required) number— — CoverinterfaceCover
Cover Prop Type Default Description close(required) (options?: MoveOptions) => Promise<unknown>— — destroy(required) () => void— — open(required) (options?: MoveOptions) => Promise<unknown>— — progress(required) number— 0 covered … 1 open. track(required) (options?: TrackOptions & { to?: 0 | 1; }) => ValueTrackInput— A timeline track that opens ( to1, default) or closes the cover.CoverOptionsinterfaceCoverOptions
CoverOptions Prop Type Default Description covered booleantrueStart covered (default true) or open. pattern CoverPattern"split-x"Default "split-x".reducedMotion ReducedMotion— — slats number— Shutter slats (2–12, default 6). CurtainRevealPropsinterfaceCurtainRevealProps
CurtainRevealProps Prop Type Default Description appear "client" | "always"— Reveal on hydration of server markup too (default false: server content is never covered again). children ReactNode— — duration number— — onOpenChange (open: boolean) => void— — open boolean— Controlled: open (true) or covered (false). Omitted: reveals once when mounted on the client. pattern "curtain" | "shutter"— — reducedMotion ReducedMotion— — ref Ref<HTMLDivElement>— — slats number— Shutter slats (2–12, default 6). Also accepts the props of: React DOM attributes.
DepthOfFieldControlinterfaceDepthOfFieldControl
DepthOfFieldControl Prop Type Default Description clear(required) (options?: MoveOptions) => Promise<unknown>— Everything sharp. destroy(required) () => void— — focus(required) (index: number, options?: MoveOptions) => Promise<unknown>— — focused(required) number— Focused layer, or -1when every layer is sharp.track(required) (index: number, options?: TrackOptions) => ValueTrackInput— — DepthOfFieldOptionsinterfaceDepthOfFieldOptions
DepthOfFieldOptions Prop Type Default Description falloff number— Blur per layer of distance in px (0–12, default 4). focus number— Initially focused layer (default none: everything sharp). maxBlur number— Blur cap in px (0–12, default 8). priority number0Priority of the filterclaims (default 0).reducedMotion ReducedMotion— — scale number— Scale reduction per layer of distance (0–0.1, default 0.02). DepthOfFieldPropsinterfaceDepthOfFieldProps
DepthOfFieldProps Prop Type Default Description children ReactNode— — duration number— — falloff number— — focus number— Focused layer (element child index), or -1/omitted for everything sharp. maxBlur number— — reducedMotion ReducedMotion— — ref Ref<HTMLDivElement>— — Also accepts the props of: React DOM attributes.
EffectTrackInputinterfaceEffectTrackInput
EffectTrackInput Prop Type Default Description duration number— ms (0–60000). easing Easing | EasingPreset— — effect(required) PresetInput<any, any>— An Entrance definition (E01–E09/E11) or a preset of one. fill TrackFill— "both"(default) renders the from-state before the start;"forwards"writes nothing before it.id string— Stable id for getTrack/retarget.mode "scrub" | "trigger"— "scrub"(default when the definition accepts an externalprogress): the definition follows the timeline clock — seek, scrub, reverse, interruption."trigger": the definition plays with its OWN clock when the playhead crosses the start (in), or crosses back (out).options object— — target(required) Styled— — LetterboxControlinterfaceLetterboxControl
LetterboxControl Prop Type Default Description destroy(required) () => void— — hide(required) (options?: MoveOptions) => Promise<unknown>— — progress(required) number— 0 hidden … 1 shown. show(required) (options?: MoveOptions) => Promise<unknown>— — track(required) (show: boolean, options?: TrackOptions) => ValueTrackInput— — LetterboxOptionsinterfaceLetterboxOptions
LetterboxOptions Prop Type Default Description reducedMotion ReducedMotion— — shown booleanfalseStart with the bars shown (default false). LetterboxPropsinterfaceLetterboxProps
LetterboxProps Prop Type Default Description active boolean— — children ReactNode— — duration number— — ratio number— Visible aspect ratio between the bars (1–4, default 2.39). reducedMotion ReducedMotion— — ref Ref<HTMLDivElement>— — size string— Fixed bar size (CSS length) instead of ratio.Also accepts the props of: React DOM attributes.
MoveOptionsinterfaceMoveOptions
MoveOptions Prop Type Default Description duration number— ms (0–10000; default per effect). easing Easing | EasingPreset— — PoseinterfacePose
Pose Prop Type Default Description blur number— Gaussian blur in px ( filterchannel, arbitrated).opacity number— Opacity factor 0–1 (multiplies with the element's own opacity). rotate number— Rotation in degrees (z axis). scale number— Uniform scale. scaleX number— Horizontal / vertical scale (multiply with scale).scaleY number— — x number— Translation in px. y number— — PoseTrackInputinterfacePoseTrackInput
PoseTrackInput Prop Type Default Description duration number— ms (0–60000). easing Easing | EasingPreset— — fill TrackFill— "both"(default) renders the from-state before the start;"forwards"writes nothing before it.from Pose— — id string— Stable id for getTrack/retarget.priority number0Priority of the filterclaim when the pose blurs (default 0).target(required) Styled— — to(required) Pose— — ProgressSourceinterfaceProgressSource
Any 0–1 progress source (the 011
ScrollProgressfits).ProgressSource Prop Type Default Description get(required) () => number— — subscribe(required) (listener: (progress: number) => void) => () => void— — SceneChapterinterfaceSceneChapter
SceneChapter Prop Type Default Description end(required) number— — id(required) string— — index(required) number— — start(required) number— Start and end as fractions of the scene (0–1). SceneChaptersControlinterfaceSceneChaptersControl
SceneChaptersControl Prop Type Default Description active(required) string— Active chapter id. chapterAt(required) (progress: number) => SceneChapter— — chapters(required) readonly SceneChapter[]— — destroy(required) () => void— — drive(required) (source: ProgressSource) => () => void— Scrub from a progress source; returns the unsubscribe. pause(required) () => void— — play(required) () => void— Play the scene on its own clock (no source). seek(required) (progress: number) => void— Render the scene at a progress (0–1). seekChapter(required) (id: string) => void— Clock mode: move to a chapter's start. segment(required) (chapterId: string, track: TrackInput, span?: readonly [number, number]) => this[0, 1]Add a track inside a chapter: spanis[start, end]as fractions of the chapter (default[0, 1]).timeline(required) Timeline— — SceneChaptersOptionsinterfaceSceneChaptersOptions
SceneChaptersOptions Prop Type Default Description chapters(required) readonly ChapterInput[]— — onChapterChange (id: string, index: number) => void— — reducedMotion ReducedMotion— — unit number— Clock duration when played without a source, ms per weight unit (100–20000, default 1500). SceneChaptersPropsinterfaceSceneChaptersProps
SceneChaptersProps Prop Type Default Description autoplay boolean— Clock mode: play the scene when mounted (no source, no progress).children ReactNode— — onChapterChange (id: string, index: number) => void— — progress number— Controlled progress 0–1 (used when there is no source).reducedMotion ReducedMotion— — ref Ref<HTMLDivElement>— — source ProgressSource— Scrub source: the useScrollScene()timeline of a<ScrollScene>, or any{ get, subscribe }.unit number1500ms per chapter weight unit in clock mode (default 1500). Also accepts the props of: React DOM attributes.
SceneSegmentPropsinterfaceSceneSegmentProps
SceneSegmentProps Prop Type Default Description asChild boolean— — children ReactNode— — effect AnyPreset— An Entrance definition or preset (triggered as the chapter crosses it)… from Poseto…or a pose transition ( from→to; defaulttois the identity).options object— — ref Ref<HTMLDivElement>— — span readonly [number, number][0, 1][start, end]as fractions of the chapter (default[0, 1]).to Pose— — Also accepts the props of: React DOM attributes.
SplitRevealPropsinterfaceSplitRevealProps
SplitRevealProps Prop Type Default Description appear "client" | "always"— Reveal on hydration of server markup too (default false: server content is never covered again). children ReactNode— — direction "x" | "y"— "x": halves part left/right (default);"y": top/bottom.duration number— — onOpenChange (open: boolean) => void— — open boolean— Controlled: open (true) or covered (false). Omitted: reveals once when mounted on the client. reducedMotion ReducedMotion— — ref Ref<HTMLDivElement>— — Also accepts the props of: React DOM attributes.
SpotlightControlinterfaceSpotlightControl
SpotlightControl Prop Type Default Description active(required) boolean— — clear(required) (options?: MoveOptions) => Promise<unknown>— — destroy(required) () => void— — focus(required) (target: Element | SpotlightTarget, options?: MoveOptions) => Promise<unknown>— — track(required) (target: Element | SpotlightTarget | null, options?: TrackOptions) => ValueTrackInput— A timeline track from the last planned pose to target(or to cleared withnull).SpotlightOptionsinterfaceSpotlightOptions
SpotlightOptions Prop Type Default Description padding number— Extra space around a focused element's box (0–200, default 16). radius number— Default radius of the lit circle around a focused element (24–800, default 120). reducedMotion ReducedMotion— — SpotlightPropsinterfaceSpotlightProps
SpotlightProps Prop Type Default Description children ReactNode— — duration number— — padding number— — radius number— — reducedMotion ReducedMotion— — ref Ref<HTMLDivElement>— — target { current: Element | null; } | Element | null— Element to light (ref object or element); null/omitted clears the spotlight.Also accepts the props of: React DOM attributes.
SpotlightTargetinterfaceSpotlightTarget
SpotlightTarget Prop Type Default Description radius number— Radius of the lit circle in px (24–800). x(required) number— — y(required) number— — StoryboardControlinterfaceStoryboardControl
StoryboardControl Prop Type Default Description count(required) number— — destroy(required) () => void— — goTo(required) (index: number) => void— — index(required) number— — next(required) () => void— — pause(required) () => void— — play(required) () => void— — playing(required) boolean— The user's intent (not paused by hover/visibility). previous(required) () => void— — rotating(required) boolean— Whether the timer is actually running now. stop(required) () => void— Pause and return to the first frame. StoryboardFramePropsinterfaceStoryboardFrameProps
StoryboardFrameProps Prop Type Default Description children ReactNode— — label string"n of N"Accessible label of the frame (default "n of N"). StoryboardOptionsinterfaceStoryboardOptions
StoryboardOptions Prop Type Default Description autoplay boolean— Start rotating automatically (default false; never under reduced motion). duration number— ms of a frame change (0–2000, default 450). interval number— ms per frame while autoplaying (2000–30000, default 5000). loop booleantrueWrap from the last frame to the first (default true). onChange (index: number, cause: "user" | "autoplay") => void— — onPlayingChange (playing: boolean) => void— — reducedMotion ReducedMotion— — start number0Initial frame (default 0). transition "fade" | "slide""fade"Frame change (default "fade").StoryboardPropsinterfaceStoryboardProps
StoryboardProps Prop Type Default Description autoplay boolean— — children ReactNode— — duration number— — interval number— — label(required) string— Accessible name of the storyboard. labels Partial<Record<"play" | "pause" | "previous" | "next" | "stop", string>>— Control labels (English defaults). loop boolean— — onChange (index: number) => void— — reducedMotion ReducedMotion— — ref Ref<HTMLElement>— — transition "fade" | "slide"— — Also accepts the props of: React DOM attributes.
TimelineinterfaceTimeline
Timeline Prop Type Default Description add(required) (track: TrackInput, at?: TimelinePosition) => this— — call(required) (fn: CallFn, at?: TimelinePosition, options?: { wait?: boolean; reverse?: CallFn; }) => this— — cancel(required) () => void— — destroy(required) () => void— Idempotent: cancel, release every track (styles restored), drop listeners. direction(required) MotionDirection— — duration(required) number— One iteration in ms. finish(required) () => void— — finished(required) Promise<MotionResult>— — getTrack(required) (id: string) => TrackInfo | undefined— — iteration(required) number— — label(required) (name: string, at?: TimelinePosition) => this— — labels(required) ReadonlyMap<string, number>— — pause(required) () => void— — play(required) () => void— — progress(required) number— — retarget(required) (trackId: string, to: Partial<Pose> | number) => void— — reverse(required) () => void— — seek(required) (progress: number) => void— Progress 0–1 of the current iteration. seekTo(required) (at: number | string, options?: { fire?: boolean; }) => void— — state(required) MotionResult["status"] | "idle" | "running" | "paused" | "failed"— — time(required) number— — timeScale(required) number— — TimelineHandleinterfaceTimelineHandle
TimelineHandle Prop Type Default Description cancel(required) () => void— — current(required) Timeline | undefined— The live timeline ( undefinedbefore mount, after unmount and on the server).finish(required) () => void— — finished(required) () => Promise<MotionResult | undefined>— Resolves with the live run's result ( undefinedwhen no timeline exists).pause(required) () => void— — play(required) () => void— — reverse(required) () => void— — seek(required) (progress: number) => void— — seekTo(required) (at: number | string, options?: { fire?: boolean; }) => void— — TimelineOptionsinterfaceTimelineOptions
TimelineOptions Prop Type Default Description conflicts ConflictPolicy— Conflict reporting of exclusive channels (pose blur, effect tracks). onComplete (result: MotionResult) => void— Once per completed run. onRepeat (iteration: number) => void— — onStart () => void— — onUpdate (time: number, progress: number) => void— — reducedMotion ReducedMotion— — repeat number— Extra iterations: 0 (default) … 1000, or Infinity(explicit only).timeScale number10.1–10 (default 1). whenHidden "pause" | "finish"— While the page is hidden: stop the clock (default) or finish. yoyo booleanfalseAlternate the direction of every repeat (default false). TimelineTrackInputinterfaceTimelineTrackInput
TimelineTrackInput Prop Type Default Description id string— — timeline(required) Timeline— — TitleSequenceOptionsinterfaceTitleSequenceOptions
TitleSequenceOptions Prop Type Default Description at TimelinePosition— Where the sequence starts in the timeline (default its current end). background Element | null— — backgroundDuration number— ms (0–10000, default 1200). backgroundFrom Pose{ opacity: 0, scale: 1.08 }Background start pose (default { opacity: 0, scale: 1.08 }); it ends at identity.effect(required) PresetInput<any, any>— Entrance (definition or preset) triggered for every line. interval number— ms between line starts (0–1000, default 120). lines(required) readonly Element[]— — options object— Options merged into the effect's options for every line. reducedMotion ReducedMotion— — TitleSequencePropsinterfaceTitleSequenceProps
TitleSequenceProps Prop Type Default Description appear "client" | "always" | "manual""client"Play on hydration of server markup too (default "client").background ReactNode— Decorative background (rendered aria-hidden).children ReactNode— — effect(required) AnyPreset— Entrance (definition or preset) triggered for every line. interval number— — onComplete () => void— — options object— — reducedMotion ReducedMotion— — ref Ref<HTMLDivElement>— — replay string | number | boolean— Changing it replays the sequence. Also accepts the props of: React DOM attributes.
TrackInfointerfaceTrackInfo
TrackInfo Prop Type Default Description detached(required) boolean— — duration(required) number— — id(required) string | undefined— — kind(required) "pose" | "value" | "effect" | "timeline"— — progress(required) number— Last rendered local progress ( NaNbefore the first render).start(required) number— — TrackOptionsinterfaceTrackOptions
TrackOptions Prop Type Default Description duration number— ms (0–10000; default per effect). easing Easing | EasingPreset— — id string— — ValueTrackInputinterfaceValueTrackInput
ValueTrackInput Prop Type Default Description duration number— ms (0–60000). easing Easing | EasingPreset— — fill TrackFill— "both"(default) renders the from-state before the start;"forwards"writes nothing before it.from(required) number— — id string— Stable id for getTrack/retarget.to(required) number— — value(required) MotionValue— — CallDirectiontype"forward" | "reverse"CallFntype(direction: CallDirection) => unknownCameraTargettypeCameraTarget
CameraTarget Prop Type Default Description focus(required) Element— — padding number— — x number— — y number— — zoom number— — CoverPatterntype"split-x" | "split-y" | "curtain" | "shutter"TimelinePositiontypeAbsolute ms, a label (`"intro"`, `"intro+=200"`), `"<"`/`">"` (± ms) or `"+=ms"`/`"-=ms"`.
number | stringTrackFilltype"both" | "forwards"TrackInputtypeTrackInput
TrackInput Prop Type Default Description duration number— ms (0–60000). easing Easing | EasingPreset— — effect(required) PresetInput<any, any>— An Entrance definition (E01–E09/E11) or a preset of one. fill TrackFill— "both"(default) renders the from-state before the start;"forwards"writes nothing before it.from Pose | number— — id string— Stable id for getTrack/retarget.mode "scrub" | "trigger"— "scrub"(default when the definition accepts an externalprogress): the definition follows the timeline clock — seek, scrub, reverse, interruption."trigger": the definition plays with its OWN clock when the playhead crosses the start (in), or crosses back (out).options object— — priority number0Priority of the filterclaim when the pose blurs (default 0).target(required) Styled— — timeline(required) Timeline— — to(required) Pose | number— — value(required) MotionValue— —