Animations

Stylet offers animation alongside designs. With Stylet you can create simple animations that you can add to your website to give it a nice look. We are going to be looking at the animations that Stylet V1.0.0 has to offer and how we can use them to create awesome, good looking, attractive components for our websites.If you want to use only Stylet Animations, you can download it seperately or include it through it's CDN, Read More.

Glow animation

We can add a glow animation using Stylet. Let's look at some examples:

Hello i am glowing fast!

Hello world!

The glow animation works by adding glow-{num}, where num < 11

glow-1 is the fastest and the slowest is glow-10

With the Glow animation, you can add easy effects in your site.


<p class="lavenderblush-bg border text-center">
Hello i am <span class="glow-1">glowing fast!</span>
</p>
<p class="lavenderblush-bg border text-center">
<span class="glow-1">Hello</span> <span class="glow-2">world</span>
<span class="glow-3">!</span>
</p>

Fade Away animation

We can fade away elements using the class fade-away. The fade away, fades an element away out of view, it is like a glow that doesn't return back. You can only view it, when the browser is refreshed and it would fade away again. To see the examples make sure you refresh in this section.

i fade away

fading away!


<p class="lavenderblush-bg border text-center fade-away-1">
i fade away
</p>
<p class="lavenderblush-bg border text-center fade-away-10">
fading away!
</p>

The fade-away animation works by adding fade-away-{num}, where num < 11. It works by incrementing 1 second each, meaning each class name has a difference of 1 second. Meaning fade-away-1 fades in a second and fade-away-10 fades in 10 seconds.

fade-away-1 is the fastest and the slowest is fade-away-10

With the Fade away animation, you can add easy effects in your site.

Wobble in animation

The wobble in animation gives the element a wobbling feature plus a glow feature. Just like the fade away we need to refresh this section to see it's effect.

wobbling in

wobbling in


<p class="lavenderblush-bg border text-center wobble-in-5">
wobbling in
</p>
<p class="lavenderblush-bg border text-center wobble-in-10">
wobbling in
</p>

The wobble-in animation works by adding wobble-in-{num}, where num < 11. It works by incrementing 1 second each, meaning each class name has a difference of 1 second. Meaning wobble-in-1 fades in a second and wobble-in-10 fades in 10 seconds.

wobble-in-1 is the fastest and the slowest is wobble-in-10

With the Wobble in animation, you can add easy effects in your site.

Glow in animation

The glow-in animation is the opposite of the fade-away, it glows in the element, to see the effect we need to refresh the page.

glow in

glow in


<p class="lavenderblush-bg border text-center glow-in-5">
glow in
</p>
<p class="lavenderblush-bg border text-center glow-in-10">
glow in
</p>

The glow-in animation works by adding glow-in-{num}, where num < 11. It works by incrementing 1 second each, meaning each class name has a difference of 1 second. Meaning glow-in-1 fades in a second and glow-in-10 fades in 10 seconds.

glow-in-1 is the fastest and the slowest is glow-in-10

With the glow in animation, you can add easy effects in your site.

Slide animation

With Stylet you can create sliding effects or animation, this effect can be useful in headers and you can use them as scroll and show.
Stylet offers four types of slide effects or animations:

  • Slide left
  • Slide right
  • Slide top
  • Slide bottom

To see their effects, we have to refresh this section

slide from the left

slide from the right

slide from the top

slide from the bottom


<p class="lavenderblush-bg border text-center slide-left-5">slide from the left</p>
<p class="lavenderblush-bg border text-center slide-right-10">slide from the right</p>
<p class="lavenderblush-bg border text-center slide-top-5">slide from the top</p>
<p class="lavenderblush-bg border text-center slide-btm-10">slide from the bottom</p>

Zoom animation

With Stylet, we can create a zoom animation to an element, the zoom element zooms in an element that has the class name zoom-{num}, where num < 10

when they try to hold me i go zoom, zoom, zoom

when they try to hold me i go zoom, zoom, zoom


<p class="lavenderblush-bg border text-center zoom-5">
when they try to hold me i go zoom, zoom, zoom
</p>
<p class="lavenderblush-bg border text-center zoom-10">
when they try to hold me i go zoom, zoom, zoom
</p>

Loaders

Stylet has pre-defined loaders that we can use if needed. They come with Stylet's standard colors E.g. black-loader-spin,white-loader-spin and so on


<div class="smooth-bg pas-3 border">
<div class="black-loader-spin"></div>
<div class="white-loader-spin"></div>
<div class="gold-loader-spin"></div>
<div class="orange-loader-spin"></div>
<div class="red-loader-spin"></div>
<div class="purple-loader-spin"></div>
<div class="plum-loader-spin"></div>
<div class="green-loader-spin"></div>
<div class="blue-loader-spin"></div>
<div class="light-green-loader-spin"></div>
<div class="dark-green-loader-spin"></div>
</div>

Float animation

We can also add a float animation to an element in Stylet.

i am floating

i am also floating

We are all floaters (lol)


<p class=" float-4">i am floating</p>
<p class=" float-1">i am also floating</p>
<p class=" float-10">We are all floaters (lol)</p>
The float animation works by incrementing it by 1 second each, float-{num} where num < 11.

Text animation (effects)

We can rotate or flip text using the text animation in Stylet. You can add these classes to see the effect, text-rotate-90, text-rotate-180, text-rotate-270, text-flip-horizontal, text-flip-vertical and text-flip-both

Spin animation

The spin animation makes the element it's being applied on to spin, 360. It spins in second by incrementing and uses a class name syntax of spin-{num} where num < 11.
We can also add the animation when the element is hovered upon. To add the hover effect of the spin, it's syntax is spin-{num}-hover

Shake animation

i am shaking!!

i am shaking also bro!

We can add a shake animation using the class syntax shake-{num} where num < 10.

<p class="shake-1 border pad-4">
i am shaking!!!!!!
</p>
<p class="shake-5 border pad-4">
i am shaking also bro!
</p>
The shake animation also works by incrementing, which means shake-5 would render the shake effect for 5 seconds!