@neshel-ui/animations/advanced
Every export of @neshel-ui/animations/advanced, 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.
CardFlipcomponentD01 — a card with two faces that flips in 3D (`div.neshel-flip`).
(props: CardFlipProps): ElementCornerRecedecomponentD05 — the corner under the pointer recedes like a folded page (`div.neshel-corner`).
(props: CornerRecedeProps): ElementCubeRotatecomponentD02 — panels (children) that change through a cube rotation (`div.neshel-cube`).
(props: CubeRotateProps): ElementGlitchcomponentD07 — RGB split / glitch bursts on text (`span.neshel-glitch`); the text exists once.
(props: GlitchProps): ElementPerspectiveGridcomponentD09 — a decorative perspective grid floor behind the children (`div.neshel-grid-host`).
(props: PerspectiveGridProps): ElementRingCarouselcomponentD03 — items (children) on a rotating 3D ring (`div.neshel-ring`).
(props: RingCarouselProps): ElementTiltShiftcomponentD11 — tilt-shift depth of field over the children (`div.neshel-tiltshift-host`).
(props: TiltShiftProps): ElementcreateCardFlipfunction(root: HTMLElement, options?: CardFlipOptions | undefined): CardFlipControlcreateCornerRecedefunction(root: HTMLElement, options?: CornerRecedeOptions | undefined): CornerRecedeControlcreateCubeRotatefunction(root: HTMLElement, options?: CubeRotateOptions | undefined): CubeControlcreateGlitchfunction(element: HTMLElement, options?: GlitchOptions | undefined): GlitchControlcreatePerspectiveGridfunction(root: HTMLElement, options?: PerspectiveGridOptions | undefined): GridControlcreateRingCarouselfunction(root: HTMLElement, options?: RingCarouselOptions | undefined): RingControlcreateTiltShiftfunction(root: HTMLElement, options?: TiltShiftOptions | undefined): TiltShiftControlgetAdvancedDebugInfofunction(): AdvancedDebugInfoGLITCH_MAX_RATEconstMaximum slice changes per second (WCAG 2.3.1 general flash threshold).
3AdvancedDebugInfointerfaceAdvancedDebugInfo
AdvancedDebugInfo Prop Type Default Description attributeEntries(required) number— — effects(required) number— — flaps(required) number— — gateElements(required) number— — gateObservers(required) number— — glitchLayers(required) number— — glitchSteps(required) number— — layers(required) number— — listeners(required) number— — observers(required) number— — CardFlipControlinterfaceCardFlipControl
CardFlipControl Prop Type Default Description destroy(required) () => void— — drive(required) (source: ProgressSource) => () => void— Follow a 0–1 source; returns the unsubscribe. flip(required) (side?: FlipSide) => void— — mode(required) "3d" | "fade"— "3d"or"fade"(reduced motion withreducedEffect: "fade", or nopreserve-3d).progress(required) number— 0 front … 1 back. seek(required) (progress: number) => void— Render an exact pose (no animation). side(required) FlipSide— The face currently facing the viewer. target(required) FlipSide— The side the card is moving to (or resting on). toggle(required) () => void— — track(required) (options?: ProgressTrackOptions) => ProgressTrack— A value track for a C01 timeline. CardFlipOptionsinterfaceCardFlipOptions
CardFlipOptions Prop Type Default Description axis "y" | "x"— — back HTMLElement— — direction 1 | -1— — flipped booleanfalseStart on the back (default false). front HTMLElement— Faces (default: the inner element's first two element children). inner HTMLElement— The rotating element (default: the root's first element child). onFlip (side: FlipSide) => void— The visible face changed (the rotation crossed 90°). onToggle (side: FlipSide) => void— A toggle (in-face control or toggle()) changed the intended side — the user's intent, before any motion.perspective number1200px 200–4000 (default 1200). reducedEffect "fade" | "instant"— Under reduced motion: cross-fade (default) or jump. reducedMotion ReducedMotion— — spring SpringOptions— — toggleSelector string | false— Elements inside the faces that toggle on click (native buttons); falsedisables.CornerRecedeControlinterfaceCornerRecedeControl
CornerRecedeControl Prop Type Default Description amount(required) number— Rendered fold amount 0–1. corner(required) Corner— — destroy(required) () => void— — reset(required) () => void— — seek(required) (corner: Corner, amount: number) => void— Render a pose exactly (no animation). set(required) (corner: Corner, amount: number) => void— Animate to a pose (programmatic or external progress). CornerRecedeOptionsinterfaceCornerRecedeOptions
CornerRecedeOptions Prop Type Default Description angle number60Maximum fold angle, deg 10–85 (default 60). corners readonly Corner[]— Corners that may fold (default all four). flap "clone" | "plain""clone""clone": inert ID-free copy of the surface;"plain": a surface-coloured triangle (default "clone").focusCorner Corner | false"top-right"Corner folded at 35 % while focus inside is :focus-visible;falsedisables (default "top-right").perspective number900px 300–3000 perspective of the flap (default 900). pointerTypes readonly ("mouse" | "pen" | "touch")[]— — reducedMotion ReducedMotion— — reverse booleanfalseLift the corner toward the viewer instead of receding (default false). shade number0.3Flap darkening 0–0.6 (default 0.3). size number0.35Fold leg as a fraction of the shorter side 0.1–0.6 (default 0.35). spring SpringOptions— — surface HTMLElement— The live content element that is clipped (default: the root's first element child). threshold number0.3Neutral zone around the centre 0–0.9 (default 0.3). CubeControlinterfaceCubeControl
CubeControl Prop Type Default Description cancel(required) () => void— — count(required) number— — destroy(required) () => void— — drive(required) (source: ProgressSource) => () => void— Follow a 0–1 source instead of the own clock; returns the unsubscribe. finish(required) () => void— — finished(required) Promise<MotionResult>— Promise of the current (or next) run. go(required) (index: number, options?: { direction?: 1 | -1; }) => void— — index(required) number— Logical active panel. mode(required) "3d" | "fade"— — next(required) () => void— — pause(required) () => void— — play(required) () => void— — previous(required) () => void— — progress(required) number— Rendered progress 0–1. refresh(required) () => void— Re-read the panels (children changed). reverse(required) () => void— — seek(required) (progress: number) => void— Render the effect at a time fraction 0–1 of its run (eased). state(required) MotionState— — track(required) (options?: ProgressTrackOptions) => ProgressTrack— A value track for createTimeline().add(…): the timeline clock drives this effect.CubeRotateOptionsinterfaceCubeRotateOptions
CubeRotateOptions Prop Type Default Description axis Axis3D— — duration number700ms 0–10000 (default 700). easing Easing | EasingPreset— — index number0Initial panel (default 0). loop booleantrueWrap around at the ends (default true). onChange (index: number) => void— — perspective number1600px 200–6000 (default 1600). reducedMotion ReducedMotion— — GlitchControlinterfaceGlitchControl
GlitchControl Prop Type Default Description active(required) boolean— — destroy(required) () => void— — play(required) () => void— — stop(required) () => void— — GlitchOptionsinterfaceGlitchOptions
GlitchOptions Prop Type Default Description colors readonly [string, string]— Two CSS colours of the channel layers. duration number600Burst length ms 100–2000 (default 600). intensity number— 0–1 (offset ≤ 6 px; default 0.4). rate number— Slice changes per second 1–3 (hard cap 3; default 3). reducedMotion ReducedMotion— — seed number1Integer seed of the slice pattern (default 1). trigger GlitchTrigger— — GridControlinterfaceGridControl
GridControl Prop Type Default Description destroy(required) () => void— — pause(required) () => void— — play(required) () => void— — state(required) GridState— — PerspectiveGridOptionsinterfacePerspectiveGridOptions
PerspectiveGridOptions Prop Type Default Description angle number72Plane tilt, deg 45–85 (default 72). cell number48Cell size px 8–256 (default 48). color stringcurrentColorLine colour (default currentColor).drift number0Lateral cells per second −4–4 (default 0). duration number5000Running time ms 0–600000 or Infinity(default 5000).fade booleantrueFade toward the horizon (default true). horizon number0.45Horizon as a fraction of the height 0–0.9 (default 0.45). line number2Line width px 1–6 (default 2). opacity number0.8Opacity 0.05–1 (default 0.8). reducedMotion ReducedMotion— — speed number1Cells per second toward the viewer 0–8 (default 1). vanishing number0.5Horizontal vanishing point 0–1 (default 0.5). ProgressSourceinterfaceProgressSource
Any 0–1 progress source (the 011
ScrollProgressand motion values fit).ProgressSource Prop Type Default Description get(required) () => number— — subscribe(required) (listener: (progress: number) => void) => () => void— — ProgressTrackinterfaceProgressTrack
A C01 value track (
timeline.add(effect.track())).ProgressTrack Prop Type Default Description duration(required) number— — easing(required) Easing | EasingPreset— — from(required) number— — id string— — to(required) number— — value(required) MotionValue— — RingCarouselOptionsinterfaceRingCarouselOptions
RingCarouselOptions Prop Type Default Description announce (index: number, count: number) => string"Slide n of N"Text of the live announcement (default "Slide n of N"). drag boolean— — gap number— px 0–400 between items (auto radius; default 24). index number— — keyboard boolean— — label string— Accessible name of the carousel (required unless the root is labelled). onChange (index: number) => void— — perspective number1400px 200–6000 (default 1400). radius "auto" | number— "auto"(from the item width) or px 50–4000.reducedMotion ReducedMotion— — spring SpringOptions— — RingControlinterfaceRingControl
RingControl Prop Type Default Description angle(required) number— Current ring angle (deg). count(required) number— — destroy(required) () => void— — go(required) (index: number) => void— — index(required) number— — next(required) () => void— — previous(required) () => void— — refresh(required) () => void— — TiltShiftControlinterfaceTiltShiftControl
TiltShiftControl Prop Type Default Description destroy(required) () => void— — drive(required) (source: ProgressSource) => () => void— — focus(required) number— — mode(required) "backdrop" | "tint" | "none"— — setFocus(required) (center: number) => void— — TiltShiftOptionsinterfaceTiltShiftOptions
TiltShiftOptions Prop Type Default Description bands number2Bands per side 1–2 (default 2). blur number6Maximum blur px 0–12 (default 6). fallback "tint" | "none"— Without backdrop-filter: a tint gradient (default) or nothing.focus number0.5Focal centre 0–1 (default 0.5). orientation "horizontal" | "vertical" | "radial"— — progress ProgressSource— 0–1 source moving the focal centre. reducedMotion ReducedMotion— — size number0.35Focal band 0.1–0.9 (default 0.35). spring SpringOptions— — tint string— — CardFlipPropstypeCardFlipProps
CardFlipProps Prop Type Default Description axis "y" | "x"— — back(required) ReactNode— — controlRef RefObject<C | null>— — defaultFlipped boolean— — direction 1 | -1— — flipped boolean— Controlled side ( true= back).front(required) ReactNode— — onFlip (side: FlipSide) => void— The visible face changed (the rotation crossed 90°). onFlippedChange (flipped: boolean) => void— The user asked for the other side (in-face toggle): the intent, reported before any motion. perspective number1200px 200–4000 (default 1200). reducedEffect "fade" | "instant"— Under reduced motion: cross-fade (default) or jump. reducedMotion ReducedMotion— — spring SpringOptions— — toggleSelector string | false— Elements inside the faces that toggle on click (native buttons); falsedisables.Also accepts the props of: React DOM attributes.
Cornertype"top-left" | "top-right" | "bottom-left" | "bottom-right"CornerRecedePropstypeCornerRecedeProps
CornerRecedeProps Prop Type Default Description angle number60Maximum fold angle, deg 10–85 (default 60). children(required) ReactElement— One element: the live surface whose corner recedes. controlRef RefObject<C | null>— — corners readonly Corner[]— Corners that may fold (default all four). flap "clone" | "plain""clone""clone": inert ID-free copy of the surface;"plain": a surface-coloured triangle (default "clone").focusCorner Corner | false"top-right"Corner folded at 35 % while focus inside is :focus-visible;falsedisables (default "top-right").perspective number900px 300–3000 perspective of the flap (default 900). pointerTypes readonly ("mouse" | "pen" | "touch")[]— — reducedMotion ReducedMotion— — reverse booleanfalseLift the corner toward the viewer instead of receding (default false). shade number0.3Flap darkening 0–0.6 (default 0.3). size number0.35Fold leg as a fraction of the shorter side 0.1–0.6 (default 0.35). spring SpringOptions— — threshold number0.3Neutral zone around the centre 0–0.9 (default 0.3). Also accepts the props of: React DOM attributes.
CubeRotatePropstypeCubeRotateProps
CubeRotateProps Prop Type Default Description axis Axis3D— — controlRef RefObject<C | null>— — defaultIndex number— — duration number700ms 0–10000 (default 700). easing Easing | EasingPreset— — index number— Controlled panel index. loop booleantrueWrap around at the ends (default true). onIndexChange (index: number) => void— — perspective number1600px 200–6000 (default 1600). reducedMotion ReducedMotion— — Also accepts the props of: React DOM attributes.
FlipSidetype"front" | "back"GlitchPropstypeGlitchProps
GlitchProps Prop Type Default Description colors readonly [string, string]— Two CSS colours of the channel layers. controlRef RefObject<C | null>— — duration number600Burst length ms 100–2000 (default 600). intensity number— 0–1 (offset ≤ 6 px; default 0.4). rate number— Slice changes per second 1–3 (hard cap 3; default 3). reducedMotion ReducedMotion— — seed number1Integer seed of the slice pattern (default 1). trigger GlitchTrigger— — Also accepts the props of: React DOM attributes.
GlitchTriggertype"hover-focus" | "hover" | "focus" | "visible" | "manual"GridStatetype"running" | "paused" | "completed" | "reduced" | "static"PerspectiveGridPropstypePerspectiveGridProps
PerspectiveGridProps Prop Type Default Description angle number72Plane tilt, deg 45–85 (default 72). cell number48Cell size px 8–256 (default 48). color stringcurrentColorLine colour (default currentColor).controlRef RefObject<C | null>— — drift number0Lateral cells per second −4–4 (default 0). duration number5000Running time ms 0–600000 or Infinity(default 5000).fade booleantrueFade toward the horizon (default true). horizon number0.45Horizon as a fraction of the height 0–0.9 (default 0.45). line number2Line width px 1–6 (default 2). opacity number0.8Opacity 0.05–1 (default 0.8). reducedMotion ReducedMotion— — speed number1Cells per second toward the viewer 0–8 (default 1). vanishing number0.5Horizontal vanishing point 0–1 (default 0.5). Also accepts the props of: React DOM attributes.
RingCarouselPropstypeRingCarouselProps
RingCarouselProps Prop Type Default Description announce (index: number, count: number) => string"Slide n of N"Text of the live announcement (default "Slide n of N"). controlRef RefObject<C | null>— — defaultIndex number— — drag boolean— — gap number— px 0–400 between items (auto radius; default 24). index number— — keyboard boolean— — label(required) string— Accessible name of the carousel. onIndexChange (index: number) => void— — perspective number1400px 200–6000 (default 1400). radius "auto" | number— "auto"(from the item width) or px 50–4000.reducedMotion ReducedMotion— — spring SpringOptions— — Also accepts the props of: React DOM attributes.
TiltShiftPropstypeTiltShiftProps
TiltShiftProps Prop Type Default Description bands number2Bands per side 1–2 (default 2). blur number6Maximum blur px 0–12 (default 6). controlRef RefObject<C | null>— — fallback "tint" | "none"— Without backdrop-filter: a tint gradient (default) or nothing.focus number0.5Focal centre 0–1 (default 0.5). orientation "horizontal" | "vertical" | "radial"— — progress ProgressSource— 0–1 source moving the focal centre. reducedMotion ReducedMotion— — size number0.35Focal band 0.1–0.9 (default 0.35). spring SpringOptions— — tint string— — Also accepts the props of: React DOM attributes.