Skip to content

Commit fe142c6

Browse files
committed
added animation reveal speeds
1 parent 92dbf02 commit fe142c6

File tree

7 files changed

+104
-12
lines changed

7 files changed

+104
-12
lines changed

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Demo :
99
###### Usage
1010
1. Add SAPBlazorAnimate To Your Project
1111
```
12-
PM> Install-Package SAPBlazorAnimate -Version 1.2.5
12+
PM> Install-Package SAPBlazorAnimate -Version 1.2.6
1313
```
1414
2. Include relevant stylesheet either in your _host.cshtml (server-side blazor) or index.html (client-side blazor)
1515
```
@@ -47,7 +47,7 @@ SAPAnimate element1;
4747
4848
</SAPAnimate>
4949
```
50-
###### Animate element whenEver you want , with buttn click or AfterRenderAsync
50+
###### Animate element whenever you want , with buttn click or AfterRenderAsync
5151

5252
```Razor
5353
void btn1Click()
@@ -58,12 +58,30 @@ element1.Animate(AnimateBook.AttentionSeekers.HeartBeat);
5858
}
5959
```
6060

61+
62+
###### Control Start Animation Speed With This Modes : Fast , Faster , Slow , Slower
63+
```Razor
64+
void btn1Click()
65+
{
66+
67+
element1.Animate(AnimateBook.AttentionSeekers.HeartBeat.Faster());
68+
69+
}
70+
```
71+
72+
6173
###### Direct Use For Elements On after page render (sample)
6274

6375
```Razor
6476
<h1 class="@AnimateBook.Flippers.Flip"> Hello World</h1>
6577
```
6678

79+
OR with slow speed
80+
81+
```Razor
82+
<h1 class="@AnimateBook.Flippers.Flip.Slow()"> Hello World</h1>
83+
```
84+
6785
<hr />
6886

6987
### License

SAPBlazorAnimate/AnimateBook.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,22 @@ public static class AnimateBook
2424
public static SAPZoomEntrancesGroup ZoomEntrances = new SAPZoomEntrancesGroup();
2525
public static SAPZoomExitsGroup ZoomExits = new SAPZoomExitsGroup();
2626
public static SAPSpecialsGroup Specials = new SAPSpecialsGroup();
27+
28+
public static string Fast(this string value)
29+
{
30+
return value + "fast ";
31+
}
32+
public static string Faster(this string value)
33+
{
34+
return value + "faster ";
35+
}
36+
public static string Slow(this string value)
37+
{
38+
return value + "slow ";
39+
}
40+
public static string Slower(this string value)
41+
{
42+
return value + "slower ";
43+
}
2744
}
2845
}

SAPBlazorAnimate/SAPBlazorAnimate.csproj

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@
1515
<ApplicationIcon>blazorlogo_WuJ_icon.ico</ApplicationIcon>
1616
<PackageIcon>blazorlogo.png</PackageIcon>
1717
<PackageIconUrl />
18-
<PackageReleaseNotes>powerfull component for animate html tags and blazor components.
19-
more info at github.</PackageReleaseNotes>
20-
<AssemblyVersion>1.2.5.0</AssemblyVersion>
21-
<FileVersion>1.2.5.0</FileVersion>
22-
<Version>1.2.5</Version>
23-
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
18+
<PackageReleaseNotes>added fast , faster , slow , slower animation modes</PackageReleaseNotes>
19+
<AssemblyVersion>1.2.6.0</AssemblyVersion>
20+
<FileVersion>1.2.6.0</FileVersion>
21+
<Version>1.2.6</Version>
22+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
2423
<PackageLicenseFile>License.md</PackageLicenseFile>
2524
</PropertyGroup>
2625
<ItemGroup>

SAPBlazorAnimate/readme.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,18 @@ element1.Animate(AnimateBook.AttentionSeekers.HeartBeat);
4747

4848
----------------------------------
4949

50-
Direct Use For Elements On afetr page render (sample)
50+
TIP 1 : Control Start Animation Speed With This Modes : Fast , Faster , Slow , Slower
51+
52+
void btn1Click()
53+
{
54+
55+
element1.Animate(AnimateBook.AttentionSeekers.HeartBeat.Faster());
56+
57+
}
58+
59+
----------------------------------
60+
61+
TIP 2 : Direct Use For Elements On fater page render (sample)
5162

5263
<h1 class="@AnimateBook.Flippers.Flip"> Hello World</h1>
5364

SAPBlazorAnimate/readme.txt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ SAPAnimate element1;
3434
</SAPAnimate>
3535

3636

37-
6.Animate element whenEver you want , with buttn click or AfterRenderAsync :
37+
6.Animate element whenever you want , with buttun click or AfterRenderAsync :
3838

3939

4040
void btn1Click()
@@ -47,7 +47,18 @@ element1.Animate(AnimateBook.AttentionSeekers.HeartBeat);
4747

4848
----------------------------------
4949

50-
Direct Use For Elements On afetr page render (sample)
50+
TIP 1 : Control Start Animation Speed With This Modes : Fast , Faster , Slow , Slower
51+
52+
void btn1Click()
53+
{
54+
55+
element1.Animate(AnimateBook.AttentionSeekers.HeartBeat.Faster());
56+
57+
}
58+
59+
----------------------------------
60+
61+
TIP 2 : Direct Use For Elements On fater page render (sample)
5162

5263
<h1 class="@AnimateBook.Flippers.Flip"> Hello World</h1>
5364

SAPBlazorAnimateDemo/Pages/Index.razor

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@page "/"
22

3-
<h1 class="@AnimateBook.Specials.JackInTheBox">Hello, world!</h1>
3+
<h1 class="@AnimateBook.Lightspeed.LightSpeedIn.Faster()">Hello, world!</h1>
44

55
<div class="row">
66
<SAPAnimate @ref="animatedElement1">
@@ -37,6 +37,32 @@
3737

3838
</div>
3939

40+
<div class="row">
41+
<div class="col-md-12">
42+
<h2>Control Animation Start Speed : Fast/Slow Sample</h2>
43+
<p>Modes : Fast , Faster , Slow , Slower</p>
44+
45+
</div>
46+
<SAPAnimate @ref="animatedElement5">
47+
<div class="@animatedElement5.Animator" style="width: 200px;
48+
height: 200px;
49+
background-color: gray;
50+
margin: 5px">
51+
52+
<button style="margin:auto;" @onclick="btn5Click">Slower ZoomIn</button>
53+
</div>
54+
</SAPAnimate>
55+
<SAPAnimate @ref="animatedElement6">
56+
<div class="@animatedElement6.Animator" style="width: 200px;
57+
height: 200px;
58+
background-color: salmon;
59+
margin: 5px">
60+
61+
<button style="margin:auto;" @onclick="btn6Click">Faster ZoomIn</button>
62+
</div>
63+
</SAPAnimate>
64+
</div>
65+
4066

4167

4268
@code
@@ -46,6 +72,8 @@
4672
SAPAnimate animatedElement2;
4773
SAPAnimate animatedElement3;
4874
SAPAnimate animatedElement4;
75+
SAPAnimate animatedElement5;
76+
SAPAnimate animatedElement6;
4977

5078

5179
void btn1Click()
@@ -64,4 +92,12 @@
6492
{
6593
animatedElement4.Animate(AnimateBook.ZoomEntrances.ZoomIn);
6694
}
95+
void btn5Click()
96+
{
97+
animatedElement5.Animate(AnimateBook.ZoomEntrances.ZoomIn.Slower());
98+
}
99+
void btn6Click()
100+
{
101+
animatedElement6.Animate(AnimateBook.ZoomEntrances.ZoomIn.Faster());
102+
}
67103
}
17.4 KB
Loading

0 commit comments

Comments
 (0)