All Projects → mikoskinen → Blazor.animate

mikoskinen / Blazor.animate

Licence: mit
Easily add fade, slide and zoom-effects into your Blazor applications.

Projects that are alternatives of or similar to Blazor.animate

Qinvideo
基于node.js开发的一套CMS后台管理系统,支持番剧,漫画,文章,弹幕等等
Stars: ✭ 264 (+73.68%)
Mutual labels:  animate
React Keyframes
Create frame-based animations in React
Stars: ✭ 561 (+269.08%)
Mutual labels:  animate
Mergi
go library for image programming (merge, crop, resize, watermark, animate, ease, transit)
Stars: ✭ 127 (-16.45%)
Mutual labels:  animate
Tween One
Animate One React Element
Stars: ✭ 310 (+103.95%)
Mutual labels:  animate
React Motion Layout
🦸 Beautiful immersive React hero animations.
Stars: ✭ 509 (+234.87%)
Mutual labels:  animate
Korge
KorGE Game Engine. Multiplatform Kotlin Game Engine
Stars: ✭ 780 (+413.16%)
Mutual labels:  animate
sinus-studio
Draws and animates a 3D spirograph-like curves.
Stars: ✭ 19 (-87.5%)
Mutual labels:  animate
Animoji Animate
Facial-Landmarks Detection based animating application similar to Apple-Animoji™
Stars: ✭ 142 (-6.58%)
Mutual labels:  animate
Kotlinpleaseanimate
Kotlin, please, can you animate my views ?
Stars: ✭ 541 (+255.92%)
Mutual labels:  animate
React Text Transition
Animate your text changes
Stars: ✭ 121 (-20.39%)
Mutual labels:  animate
React Awesome Resume
a resume by using Luy/React
Stars: ✭ 337 (+121.71%)
Mutual labels:  animate
Ngx Page Scroll
Animated scrolling functionality for angular written in pure typescript
Stars: ✭ 422 (+177.63%)
Mutual labels:  animate
Simpleratingbar
A simple RatingBar that you can easier to customize image and animations
Stars: ✭ 1,157 (+661.18%)
Mutual labels:  animate
Swiftui
Examples projects using SwiftUI released by WWDC2019. Include Layout, UI, Animations, Gestures, Draw and Data.
Stars: ✭ 3,579 (+2254.61%)
Mutual labels:  animate
Vue Loaders
Vue + loaders.css
Stars: ✭ 127 (-16.45%)
Mutual labels:  animate
Sequent
A simple continuous animation library for Android UI.
Stars: ✭ 263 (+73.03%)
Mutual labels:  animate
React Move
React Move | Beautiful, data-driven animations for React
Stars: ✭ 6,395 (+4107.24%)
Mutual labels:  animate
Mimic.css
Everyone else is doing it!
Stars: ✭ 144 (-5.26%)
Mutual labels:  animate
React Scrollchor
A React component for scroll to `#hash` links with smooth animations
Stars: ✭ 141 (-7.24%)
Mutual labels:  animate
React Simple Animate
🎯 React UI animation made easy
Stars: ✭ 1,626 (+969.74%)
Mutual labels:  animate

Now part of Blazorise

Starting from the 2020/12/1, Blazor.Animate is now proud to be part of the Blazorise: https://github.com/stsrki/Blazorise. All the updates and future work for Blazor.Animate will continue through Blazorise.

Blazor.Animate

Easily add fade, slide and zoom-effects into your Blazor applications. Blazor.Animate is powered by the excellent AOS-library.

Blazor.Animate animation

Blazor.Animate is an animation component for Blazor. With Blazor.Animate you can animate how other components are brought to the view. You can easily add fade, slide and zoom-effects and even add easing to the animations.

NuGet

Quick Start

To animate a component, wrap it inside Animate-component and use the Animation-parameter to define the animation:

    <Animate Animation="Animations.ZoomIn" Duration="TimeSpan.FromSeconds(0.5)" >
        <Counter></Counter>
    </Animate>

Getting Started

Few steps are required in order to use the library.

Add NuGet

Install-Package BlazorAnimate

Configure _Imports.razor

...
@using BlazorAnimate

Add JS interop into _Host.cshtml

    <script src="_content/BlazorAnimate/blazorAnimateInterop.js"></script>

Use the Animate-component

    <Animate Animation="Animations.ZoomIn" Duration="TimeSpan.FromSeconds(0.5)" Delay="TimeSpan.FromSeconds(1)">
        <Counter></Counter>
    </Animate>

Sample

For a sample, please view http://animateblazorsamplessvc.azurewebsites.net/

The sample's source code is available from GitHub: https://github.com/mikoskinen/Blazor.Animate/tree/master/samples/BlazorAnimate.Sample

Running animation manually

It's possible to run the animation manually. Please note that the animated component will be hidden until the animation is manually executed.

To animate component manually, first set the IsManual to true and also capture the reference to the component:

	<Animate Animation="Animations.ZoomIn" Duration="TimeSpan.FromSeconds(0.5)" @ref="myAnim" IsManual="true">
		<Counter></Counter>
	</Animate>

Then in code-behind, call Run-method to animate the component:

	@code {

		private Animate myAnim;

		private void RunAnimation()
		{
			myAnim.Run();
		}
	}

The Manual.razor page in the sample illustrates this functionality.

Animations

To define an animation, use the Animation-property of the Animate-component. The built-in animations are available from BlazorAnimate.Animations:

  • Fade
  • FadeIn
  • FadeUp
  • FadeDown
  • FadeLeft
  • FadeRight
  • FadeUpRight
  • FadeUpLeft
  • FadeDownRight
  • FadeDownLeft
  • FlipUp
  • FlipDown
  • FlipLeft
  • FlipRight
  • SlideUp
  • SlideDown
  • SlideLeft
  • SlideRight
  • ZoomIn
  • ZoomInUp
  • ZoomInDown
  • ZoomInLeft
  • ZoomInRight
  • ZoomOut
  • ZoomOutUp
  • ZoomOutDown
  • ZoomOutLeft
  • ZoomOutRight

Use Duration (TimeSpan) or DurationMs -property to define the duration of an animation.

Use Delay (TimeSpan) or DelayMs -property to define how long the animation is delayed before it is started.

Available easings

To define an easing for the animation, use the Easing-property of the Animate-component. The built-in easings are available from BlazorAnimate.Easings:

  • Linear
  • Ease
  • EaseIn
  • EaseOut
  • EaseInOut
  • EaseInBack
  • EaseOutBack
  • EaseInOutBack
  • EaseInSine
  • EaseOutSine
  • EaseInOutSine
  • EaseInQuad
  • EaseOutQuad
  • EaseInOutQuad
  • EaseInCubic
  • EaseOutCubic
  • EaseInOutCubic
  • EaseInQuart
  • EaseOutQuart
  • EaseInOutQuart

Configuring the defaults

ASP.NET Core's options can be used to define the default animation settings:

            services.Configure<AnimateOptions>(options =>
            {
                options.Animation = Animations.FadeDown;
                options.Duration = TimeSpan.FromMilliseconds(100);
            });

If no animation parameters is defined on the Animate-component, the defaults are used:

<Animate>
    <h1>Hello, world!</h1>
</Animate>

Named configurations

Blazor.Animate supports named animation settings through the ASP.NET Core's named options. Here's an example where two configurations are provided, one without a name (the defaults) and one with a name:

            services.Configure<AnimateOptions>("my", options =>
            {
                options.Animation = Animations.FadeDown;
                options.Duration = TimeSpan.FromSeconds(2);
            });

            services.Configure<AnimateOptions>(options =>
            {
                options.Animation = Animations.FadeDown;
                options.Duration = TimeSpan.FromMilliseconds(100);
            });

To use a named configuration, provide the OptionsName-parameter:

<Animate OptionsName="my">
    <h1>Hello, world!</h1>
</Animate>

Authors

Blazor.Animate is created by Mikael Koskinen.

Contributions are welcome!

License

Blazor.Animate is MIT licensed. The library uses the following other libraries:

  • AOS: MIT-license
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].