MonacoLabs.Presto.Avalonia.Lottie
0.1.0-preview.1
dotnet add package MonacoLabs.Presto.Avalonia.Lottie --version 0.1.0-preview.1
NuGet\Install-Package MonacoLabs.Presto.Avalonia.Lottie -Version 0.1.0-preview.1
<PackageReference Include="MonacoLabs.Presto.Avalonia.Lottie" Version="0.1.0-preview.1" />
<PackageVersion Include="MonacoLabs.Presto.Avalonia.Lottie" Version="0.1.0-preview.1" />
<PackageReference Include="MonacoLabs.Presto.Avalonia.Lottie" />
paket add MonacoLabs.Presto.Avalonia.Lottie --version 0.1.0-preview.1
#r "nuget: MonacoLabs.Presto.Avalonia.Lottie, 0.1.0-preview.1"
#:package MonacoLabs.Presto.Avalonia.Lottie@0.1.0-preview.1
#addin nuget:?package=MonacoLabs.Presto.Avalonia.Lottie&version=0.1.0-preview.1&prerelease
#tool nuget:?package=MonacoLabs.Presto.Avalonia.Lottie&version=0.1.0-preview.1&prerelease
MonacoLabs.Presto.Avalonia.Lottie
Lottie playback for MonacoLabs.Presto.Avalonia, drawn
through SkiaSharp.Skottie. LottieView shows one frame of its Composition; Presto drives the frame and does not
interpret Lottie itself. Frame and Progress are ordinary styled properties, so a tween, a timeline, Seek, a
scroll-synced animation or a binding drives them like any other. It reads JSON and dotLottie (.lottie) files, plays
named marker segments, and can play on the render thread so a spinner keeps moving while the UI thread is blocked.
Install
dotnet add package MonacoLabs.Presto.Avalonia.Lottie
Targets net10.0; the bridge and core packages come with it.
Quick start
<presto:LottieView Composition="avares://MyApp/Assets/Lottie/spinner.json" Width="120" Height="120"
presto:Animate.OnAttached="{presto:PlayLottie}" />
xmlns:presto="https://github.com/stevemonaco/MonacoLabs.Presto" covers this package too. From code:
using MonacoLabs.Presto;
using MonacoLabs.Presto.Lottie;
toggle.Composition = LottieComposition.Load(new Uri("avares://MyApp/Assets/Lottie/toggle.json"));
toggle.Play(); // the whole composition once, at its frame rate
toggle.Play("on"); // a marker's segment, ignoring case
toggle.PlaySegment(60, 0, loop: true, speed: 2); // a frame range, backwards when to is the lower
timeline.Add(toggle, Recipes.PlayLottie("on", loop: false), 0);
LottieComposition is immutable and can be shared between views; input Skottie cannot play throws
FormatException.
Trimming and NativeAOT
The package is marked IsTrimmable and IsAotCompatible and builds with no trim or AOT warnings; LottieView needs
no registration. See the Trimming and NativeAOT
section.
More
- Lottie documentation: segments, recipe, dotLottie, render thread and what is out of scope
- Documentation and feature tour
- Changelog
License
MIT; see LICENSE. Presto is inspired by, and was initially ported from, anime.js by Julian Garnier, used under the MIT license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- Avalonia.Skia (>= 12.1.4)
- MonacoLabs.Presto.Avalonia (= 0.1.0-preview.1)
- SkiaSharp.Skottie (>= 3.119.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.1 | 79 | 10/22/2026 |