CodeChops.Crossblade
1.0.10
See the version list below for details.
dotnet add package CodeChops.Crossblade --version 1.0.10
NuGet\Install-Package CodeChops.Crossblade -Version 1.0.10
<PackageReference Include="CodeChops.Crossblade" Version="1.0.10" />
paket add CodeChops.Crossblade --version 1.0.10
#r "nuget: CodeChops.Crossblade, 1.0.10"
// Install CodeChops.Crossblade as a Cake Addin #addin nuget:?package=CodeChops.Crossblade&version=1.0.10 // Install CodeChops.Crossblade as a Cake Tool #tool nuget:?package=CodeChops.Crossblade&version=1.0.10
Crossblade
Crossfades for your favourite Blazor website
Crossblade is a Blazor component for enabling crossfades when navigating between pages on your Blazor website. It works on every hosting model: Blazor WebAssembly (ASP.NET core hosted) or Blazor ServerSide. Crossfades will be triggered when navigating to different pages by default.
Check out www.CodeChops.nl to see this package in action, and to see more projects.
Getting started
- Install the package
CodeChops.Crossblade
in your Blazor project. - Add
builder.Services.AddCrossblade()
to yourProgram.cs
and provide the correctRenderEnvironment
argument. - Wrap your main component in the
Crossblade
component. - Provide the following parameters (or don't provide them for the defaults):
AnimationDuration
: The animation duration in milliseconds (default: 350ms).FireOnNavigationChanging
: Crossfade when navigating to different locations on your website (default: true).TransitionTimingFunction
: The transition timing function (default: ease-in).
If crossfades have to be triggered manually, simply call
await CrossBlade.Execute()
.
Try it out
In order to try out this package, you need to execute the following easy steps:
- Create a new Blazor ServerSide / WebAssembly (hosted) project from the default templates of .NET 7.
- Follow the Getting started steps above.
- Optionally add the following css to your
site.css
orapp.css
(depending on the hosting model):
/* This will create a white background so the crossfades look better. */
main {
background-color: white;
}
Product | Versions 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. |
-
net8.0
- Microsoft.AspNetCore.Components (>= 8.0.2)
- Microsoft.AspNetCore.Components.Web (>= 8.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Removed Position parameter.