Fable.Ranvier.Anime.Traced 0.1.44

dotnet add package Fable.Ranvier.Anime.Traced --version 0.1.44
                    
NuGet\Install-Package Fable.Ranvier.Anime.Traced -Version 0.1.44
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Fable.Ranvier.Anime.Traced" Version="0.1.44" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Fable.Ranvier.Anime.Traced" Version="0.1.44" />
                    
Directory.Packages.props
<PackageReference Include="Fable.Ranvier.Anime.Traced" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Fable.Ranvier.Anime.Traced --version 0.1.44
                    
#r "nuget: Fable.Ranvier.Anime.Traced, 0.1.44"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Fable.Ranvier.Anime.Traced@0.1.44
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Fable.Ranvier.Anime.Traced&version=0.1.44
                    
Install as a Cake Addin
#tool nuget:?package=Fable.Ranvier.Anime.Traced&version=0.1.44
                    
Install as a Cake Tool

Fable.Ranvier.Anime

Typed anime.js 4.5 bindings for Fable, with Ranvier integration. Install the JavaScript package beside it:

npm install animejs@4.5.0

Parameters are constructors with named optional arguments. Each emits an object literal holding only the arguments given, and every function is imported from animejs on its own, so a bundle carries only the anime features it calls.

open Ranvier.Anime

let card (el: Fable.Core.TS.Dom.Element) =
    Anime.animate (el, Anim(x = 100, opacity = Value.fromTo (0, 1), duration = 400, ease = Ease.outQuart))
// animate(el, { x: 100, opacity: [0, 1], duration: 400, ease: "outQuart" })

Ranvier.Anime.Reactive ties anime objects to Ranvier's ownership tree and signals:

  • own reverts an animation, timeline, draggable or layout when the current owner is disposed.
  • track publishes a tickable's progress, running and completed state as memos.
  • scrub seeks a tickable to a signal's progress; drive animates an animatable property to a signal's value.
  • policy is a signal of the reduced-motion preference.

Ranvier.Anime.Testing steps anime's engine by hand: mock Date before animejs is imported, call Testing.manual (), then advance the mocked time and call Testing.step ().

The assembly also compiles on .NET, so portable code can reference it; the bindings run only under Fable.

Typed CSS custom properties

The typed bridge is available in Fable.Ranvier.Anime and Ranvier.View.Anime 0.1.1-alpha.1; their runtime dependency supplies Ranvier.Css 0.1.1-alpha.1. Generated sugars remain in Ranvier.Css.Bindings 0.1.1-alpha.1.

Add Ranvier.Css.Bindings for the generated Css sugars. Custom-property handles and numeric values retain the same grammar marker through Anime parameters:

open Ranvier.Css
open Ranvier.Anime

let gap = Css.lengthVariable "--gap"

let animateGap (el: Fable.Core.TS.Dom.Element) =
    Anime.animate(el, Anim(duration = 300).With(gap, Css.px 0., Css.px 100.))

let pulseGap (el: Fable.Core.TS.Dom.Element) =
    Anime.animate(el, Anim(duration = 600).With(gap, [| Css.px 0.; Css.px 100.; Css.px 20. |]))

Anim.With(variable, value) supplies a target; its existing CSS value must use the target's unit. Explicit endpoints and keyframes must have matching unit suffixes. A length handle rejects angles at compile time; mixed units and compound endpoints raise ArgumentException before changing the parameters. Use numeric literals as endpoints and consume the animated variable in CSS expressions such as Css.width (Css.variable gap * Css.number 2. + Css.px 10.).

Reactive.driveCss read element variable (AnimatableProp(duration = 300.)) sets the first reader value immediately and animates later changes through Anime's animatable object. The reader must keep its unit suffix. Disposing its owner stops animation and restores the original inline value and priority. Frames update the CSS variable directly; they do not write signals.

In views, use Motion.followCss variable parameters read as an element attribute, alongside styles and user classes. It uses the existing Motion exit lifecycle. The complete component example combines a reactive signal, typed expressions, an automatic style class and a user class. Extract and serve its CSS with the normal CSS build pipeline.

The example project is docs/samples/css-anime/Ranvier.Docs.CssAnime.fsproj; pass it to the CSS compiler for either CSS modules or a single stylesheet. Its static width remains calc(var(--card-gap, 0px) * 2 + 10px) while each component instance owns its variable animation.

These helpers use Anime's JavaScript engine. They accept finite numeric tokens with generated metadata. CSS keywords, colors, var() and calc() endpoints remain separate interpolation concerns; arbitrary valid CSS does not imply numeric interpolation. Animate a numeric variable used by the expression instead. WAAPI's custom-property registration is not provided by this bridge.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Fable.Ranvier.Anime.Traced:

Package Downloads
Ranvier.View.Anime.Traced

The traced build of Ranvier.View.Anime: motion parts for Ranvier.View templates over anime.js. Depends on Ranvier.View.Traced and Fable.Ranvier.Anime.Traced.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.44 85 11/1/2026
0.1.39 81 11/1/2026
0.1.8 81 10/31/2026
0.1.7 87 10/31/2026
0.1.6 94 10/31/2026
0.1.5 82 10/30/2026
0.1.4 77 10/30/2026
0.1.3 75 10/29/2026
0.1.2 75 10/29/2026
0.1.1 88 10/29/2026
0.1.1-alpha.1 73 10/28/2026
0.1.0-alpha.3 63 10/27/2026
0.1.0-alpha.2 63 10/27/2026
0.1.0-alpha.1 62 10/26/2026

Alpha release. The API may change before 1.0.