BcAnimation
Description
You can use BcAnimations to define a single CSS animation point in C# / Blazor. The styles must be applied manually or through another component. This is often used with BcAnimationTimeline to create more complex animations.
BcAnimation Properties & Methods
Identifier
string
The unique identifier of the animation timeline. Used to differentiate between multiple animations.
Target
string
The ID of the target element that the animation will be applied to.
Delay
TimeSpan
The delay before the 'Started' event is triggered.
Duration
TimeSpan
Defines the CSS 'transition-duration' property. After the 'Started' event is triggered, this duration acts as a delay before the 'Finished' event is triggered.
styles
List < BcStylesStyleModel >
A list of styles that should be applied to the target element during the animation.
Started
Action
An action that triggers when the styles should be applied to the target element.
Finished
Action < string >
An action that triggers when the animation completes.
HasStarted
bool
Indicates whether the animation has started.
HasFinished
bool
Indicates whether the animation has finished.
Starts the animation. After the defined delay, the 'Started' action fires, passing the target and styles. The animation runs for the specified duration, after which the 'Finished' event triggers with the target element.
Stops the animation immediately.