menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ToastAnimationsModel - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ToastAnimationsModel

    Represents the animation configuration model for Toast notifications.

    Inheritance
    System.Object
    ToastAnimationsModel
    Namespace: Syncfusion.Blazor.Notifications
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ToastAnimationsModel : Object
    Remarks

    This class defines the specific animation properties including effect type, duration, and easing function. It provides fine-grained control over how Toast notifications appear and disappear with various visual effects.

    Examples
    var showAnimation = new ToastAnimationsModel
    {
        Effect = ToastEffect.FadeZoom,
        Duration = 400,
        Easing = ToastEasing.EaseInOut
    };

    Constructors

    ToastAnimationsModel()

    Declaration
    public ToastAnimationsModel()

    Properties

    Duration

    Gets or sets the duration for the Toast animation in milliseconds.

    Declaration
    public int Duration { get; set; }
    Property Value
    Type Description
    System.Int32

    An integer value representing the animation duration in milliseconds. The default value is typically 300ms.

    Remarks

    This property controls how long the animation takes to complete. Shorter durations create quick transitions, while longer durations create more gradual, slower animations. Common values range from 200ms to 800ms.

    Easing

    Gets or sets the animation timing function for the Toast transition.

    Declaration
    public ToastEasing Easing { get; set; }
    Property Value
    Type Description
    ToastEasing

    A ToastEasing enumeration value that determines the animation timing curve.

    Remarks

    This property controls the acceleration and deceleration of the animation over time. Different easing functions create different visual feels, such as smooth, bouncy, or abrupt transitions. Common options include EaseIn, EaseOut, EaseInOut, and Linear.

    Effect

    Gets or sets the animation effect to be applied during Toast transitions.

    Declaration
    public ToastEffect Effect { get; set; }
    Property Value
    Type Description
    ToastEffect

    A ToastEffect enumeration value representing the visual animation effect.

    Remarks

    This property specifies the type of visual transition effect for the Toast notification. When an effect like Fade is selected, the Toast will use FadeIn for showing and FadeOut for hiding. The available animation effects include:

    • Fade - Simple opacity transition
    • FadeZoom - Combines fading with scaling effect
    • FlipLeftDown, FlipLeftUp, FlipRightDown, FlipRightUp - 3D flip animations
    • FlipXDown, FlipXUp, FlipYLeft, FlipYRight - Axis-specific flip effects
    • SlideBottom, SlideLeft, SlideRight, SlideTop - Directional slide transitions
    • Zoom - Scaling effect without opacity change
    • None - No animation effect
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved